summaryrefslogtreecommitdiff
path: root/drivers/zorro
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-07-30 21:10:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-05 14:37:04 +0200
commit18d214cc1d83af5dadf12c383686715497f20571 (patch)
tree4a4d3ae611dc55ed98e007510c113e065aa984d5 /drivers/zorro
parentfe976c4aadae80e4a5a3f665de685ce4f0b0426c (diff)
zorro: Simplify remove callback
The driver core only calls a remove callback when the device was successfully bound (aka probed) before. So dev->driver is never NULL. (And even if it was NULL, to_zorro_driver(NULL) isn't ...) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20210730191035.1455248-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/zorro')
-rw-r--r--drivers/zorro/zorro-driver.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c
index c18524bb8b2a..ab06c9ce2c78 100644
--- a/drivers/zorro/zorro-driver.c
+++ b/drivers/zorro/zorro-driver.c
@@ -67,11 +67,9 @@ static void zorro_device_remove(struct device *dev)
struct zorro_dev *z = to_zorro_dev(dev);
struct zorro_driver *drv = to_zorro_driver(dev->driver);
- if (drv) {
- if (drv->remove)
- drv->remove(z);
- z->driver = NULL;
- }
+ if (drv->remove)
+ drv->remove(z);
+ z->driver = NULL;
}