Commit 464956f7 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jiri Kosina

HID: intel-ish-hid: Drop if block with an always false condition

A remove callback is only ever called for a bound device. So there is no
need to check for device or driver being NULL.
Signed-off-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 69aea9d2
......@@ -257,17 +257,13 @@ static int ishtp_cl_bus_match(struct device *dev, struct device_driver *drv)
static int ishtp_cl_device_remove(struct device *dev)
{
struct ishtp_cl_device *device = to_ishtp_cl_device(dev);
struct ishtp_cl_driver *driver;
if (!device || !dev->driver)
return 0;
struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver);
if (device->event_cb) {
device->event_cb = NULL;
cancel_work_sync(&device->event_work);
}
driver = to_ishtp_cl_driver(dev->driver);
if (!driver->remove) {
dev->driver = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment