summaryrefslogtreecommitdiffstats
path: root/drivers/nubus
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2021-07-30 21:10:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-05 14:37:03 +0200
commitf52c9ccb86237378d354f7bd71b6fcc9f3ff7f67 (patch)
tree37bbcabf0226ff61a278807b4398d811e842977c /drivers/nubus
parentnubus: Make struct nubus_driver::remove return void (diff)
downloadlinux-f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67.tar.xz
linux-f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67.zip
nubus: Simplify check in 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 the respective check can just be dropped. Acked-by: Finn Thain <fthain@linux-m68k.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20210730191035.1455248-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nubus')
-rw-r--r--drivers/nubus/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c
index d9d04f27f89b..17fad660032c 100644
--- a/drivers/nubus/bus.c
+++ b/drivers/nubus/bus.c
@@ -33,7 +33,7 @@ static void nubus_device_remove(struct device *dev)
{
struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
- if (dev->driver && ndrv->remove)
+ if (ndrv->remove)
ndrv->remove(to_nubus_board(dev));
}