* [patch] Staging: quickstart: acpi_status is unsigned
@ 2010-08-10 5:42 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-08-10 5:42 UTC (permalink / raw)
To: kernel-janitors
acpi_bus_register_driver() returns an int, not acpi_status. It returns
zero on success and negative error codes on failure, but acpi_status is
unsigned. We can just use "ret" here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
index 6612247..33c09fa 100644
--- a/drivers/staging/quickstart/quickstart.c
+++ b/drivers/staging/quickstart/quickstart.c
@@ -398,16 +398,15 @@ static int __init quickstart_init_input(void)
static int __init quickstart_init(void)
{
int ret;
- acpi_status status = 0;
/* ACPI Check */
if (acpi_disabled)
return -ENODEV;
/* ACPI driver register */
- status = acpi_bus_register_driver(&quickstart_acpi_driver);
- if (status < 0)
- return -ENODEV;
+ ret = acpi_bus_register_driver(&quickstart_acpi_driver);
+ if (ret)
+ return ret;
/* If existing bus with no devices */
if (!quickstart_data.btn_lst) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-10 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-10 5:42 [patch] Staging: quickstart: acpi_status is unsigned Dan Carpenter
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.