Skip to contentSkip to conversation

drivers/base: redundant return value settings in try_to_bring_up_master()

PATCH In review Liu Ying 2 participants 3 messages Jun 17, 2014 – Jul 14, 2014

Subsystems (2)
lore
Share & tools
lore

Liu Ying

author
#0 lore raw

PATCH 1/1 drivers/base: redundant return value settings in try_to_bring_up_master()

Remove redundant return value settings 'ret = 0;' in the function try_to_bring_up_master(), since it has already been set to zero.

---
 drivers/base/component.c |    2 --
 1 file changed, 2 deletions(-)
drivers/base/component.c +0 -2
index c477899..007600e 100644
@@ -123,13 +123,11 @@ static int try_to_bring_up_master(struct master *master,
 		if (master->ops->add_components(master->dev, master)) {
 			/* Failed to find all components */
 			master_remove_components(master);
-			ret = 0;
 			goto out;
 		}
 
 		if (component && component->master != master) {
 			master_remove_components(master);
-			ret = 0;
 			goto out;
 		}
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 7 lines · Liu Ying

Remove redundant return value settings 'ret = 0;' in the function try_to_bring_up_master(), since it has already been set to zero.

---
 drivers/base/component.c |    2 --
 1 file changed, 2 deletions(-)

This patch no longer applies to my tree, are you sure it's still needed?

If so, please refresh and resend.

thanks,

greg k-h

author
#2 lore raw
Quoted 10 lines · Greg KH
Quoted 7 lines · Liu Ying

Remove redundant return value settings 'ret = 0;' in the function try_to_bring_up_master(), since it has already been set to zero.

---
  drivers/base/component.c |    2 --
  1 file changed, 2 deletions(-)

This patch no longer applies to my tree, are you sure it's still needed?

It is no longer needed, because Russell's patch[1] on your tree changed this piece of code.

[1] https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git/commit/drivers/base/component.c?h=driver-core-next&id=c334940ea26cb58f5514dcbb225a3f397b2684ad

Regards,

Liu Ying

Quoted 7 lines

If so, please refresh and resend.

thanks,

greg k-h