* [PATCH] hp-wireless: remove unneeded goto/label in hpwl_init
@ 2015-08-23 11:41 Giedrius Statkevičius
2015-08-26 6:36 ` Darren Hart
0 siblings, 1 reply; 2+ messages in thread
From: Giedrius Statkevičius @ 2015-08-23 11:41 UTC (permalink / raw)
To: dvhart; +Cc: platform-driver-x86, Giedrius Statkevičius
acpi_bus_register_driver() already returns an appropriate value (0 on
success, and some negative value on error) to be used in __init functions
so the goto/label is redundant in hpwl_init thus remove it and directly
return the value
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
---
drivers/platform/x86/hp-wireless.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/platform/x86/hp-wireless.c b/drivers/platform/x86/hp-wireless.c
index 4e4cc8b..988eedb 100644
--- a/drivers/platform/x86/hp-wireless.c
+++ b/drivers/platform/x86/hp-wireless.c
@@ -114,14 +114,9 @@ static int __init hpwl_init(void)
pr_info("Initializing HPQ6001 module\n");
err = acpi_bus_register_driver(&hpwl_driver);
- if (err) {
+ if (err)
pr_err("Unable to register HP wireless control driver.\n");
- goto error_acpi_register;
- }
-
- return 0;
-error_acpi_register:
return err;
}
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hp-wireless: remove unneeded goto/label in hpwl_init
2015-08-23 11:41 [PATCH] hp-wireless: remove unneeded goto/label in hpwl_init Giedrius Statkevičius
@ 2015-08-26 6:36 ` Darren Hart
0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2015-08-26 6:36 UTC (permalink / raw)
To: Giedrius Statkevičius; +Cc: platform-driver-x86
On Sun, Aug 23, 2015 at 02:41:09PM +0300, Giedrius Statkevičius wrote:
> acpi_bus_register_driver() already returns an appropriate value (0 on
> success, and some negative value on error) to be used in __init functions
> so the goto/label is redundant in hpwl_init thus remove it and directly
> return the value
>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Thanks Giedrius, queued.
--
Darren Hart
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-26 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-23 11:41 [PATCH] hp-wireless: remove unneeded goto/label in hpwl_init Giedrius Statkevičius
2015-08-26 6:36 ` Darren Hart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.