forked from Minki/linux
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:
parent
b2c943e527
commit
f52c9ccb86
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user