mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
mips: sgi-ip22: Drop redundant check from .remove()
The remove callback is only called by the driver core if there is a driver to unbind, so there is no need to check dev->driver to be non-NULL. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
7dbdf04d6b
commit
3bc5342c2e
@ -148,7 +148,7 @@ static void gio_device_remove(struct device *dev)
|
||||
struct gio_device *gio_dev = to_gio_device(dev);
|
||||
struct gio_driver *drv = to_gio_driver(dev->driver);
|
||||
|
||||
if (dev->driver && drv->remove)
|
||||
if (drv->remove)
|
||||
drv->remove(gio_dev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user