diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-09-21 15:10:33 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-09-22 11:08:18 +0200 |
commit | 36725cb091c51104e74d1008097e5d4d10ff372f (patch) | |
tree | 13c9dee8c99d3d443539c6bd197a3a72763fba8c /drivers/hid/intel-ish-hid | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid... (diff) | |
download | linux-36725cb091c51104e74d1008097e5d4d10ff372f.tar.xz linux-36725cb091c51104e74d1008097e5d4d10ff372f.zip |
HID: intel-ish-hid: simplify the return expression of ishtp_bus_remove_device()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/intel-ish-hid')
-rw-r--r-- | drivers/hid/intel-ish-hid/ishtp/bus.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index c47c3328a0f4..bba29cd36d29 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -502,8 +502,6 @@ 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; @@ -511,11 +509,7 @@ int ishtp_cl_driver_register(struct ishtp_cl_driver *driver, 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); |