From f52c9ccb86237378d354f7bd71b6fcc9f3ff7f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 30 Jul 2021 21:10:32 +0200 Subject: nubus: Simplify check in remove callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/nubus/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } -- cgit v1.2.3