From: Uwe Kleine-König Date: Fri, 30 Jul 2021 19:10:32 +0000 (+0200) Subject: nubus: Simplify check in remove callback X-Git-Tag: accepted/tizen/unified/20230118.172025~6525^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210730191035.1455248-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c index d9d04f2..17fad66 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)); }