Skip to content

Commit

Permalink
Staging: quickstart: acpi_status is unsigned
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent 0b6e722 commit f090386
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/staging/quickstart/quickstart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f090386

Please sign in to comment.