Skip to content

Commit

Permalink
HID: intel-ish-hid: simplify the return expression of ishtp_bus_remov…
Browse files Browse the repository at this point in the history
…e_device()

Simplify the return expression.

Signed-off-by: Qinglang Miao <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Qinglang Miao authored and Jiri Kosina committed Sep 22, 2020
1 parent fc3abb5 commit 36725cb
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/hid/intel-ish-hid/ishtp/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,20 +502,14 @@ static void ishtp_bus_remove_device(struct ishtp_cl_device *device)
int ishtp_cl_driver_register(struct ishtp_cl_driver *driver,
struct module *owner)
{
int err;

if (!ishtp_device_ready)
return -ENODEV;

driver->driver.name = driver->name;
driver->driver.owner = owner;
driver->driver.bus = &ishtp_cl_bus_type;

err = driver_register(&driver->driver);
if (err)
return err;

return 0;
return driver_register(&driver->driver);
}
EXPORT_SYMBOL(ishtp_cl_driver_register);

Expand Down

0 comments on commit 36725cb

Please sign in to comment.