Commit f52c9ccb authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

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: default avatarFinn Thain <fthain@linux-m68k.org>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20210730191035.1455248-2-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2c943e5
...@@ -33,7 +33,7 @@ static void nubus_device_remove(struct device *dev) ...@@ -33,7 +33,7 @@ static void nubus_device_remove(struct device *dev)
{ {
struct nubus_driver *ndrv = to_nubus_driver(dev->driver); struct nubus_driver *ndrv = to_nubus_driver(dev->driver);
if (dev->driver && ndrv->remove) if (ndrv->remove)
ndrv->remove(to_nubus_board(dev)); ndrv->remove(to_nubus_board(dev));
} }
......
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