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>
This commit is contained in:
Uwe Kleine-König 2021-07-30 21:10:32 +02:00 committed by Greg Kroah-Hartman
parent b2c943e527
commit f52c9ccb86
1 changed files with 1 additions and 1 deletions

View File

@ -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));
} }