mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
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 <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
1 parent
b2c943e527
commit
f52c9ccb86
1 file changed
+1
-1
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user