Commit 609cf09c authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

ipack: Handle a driver without remove callback

A driver that only consumes devm-managed resources might well have no
remove callback. Additionally given that the device core ignores the return
value of ipack_bus_remove() stop returning an error code.
Signed-off-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
Acked-by: default avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Link: https://lore.kernel.org/r/20210207215556.96371-2-uwe@kleine-koenig.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c31d32ba
...@@ -72,10 +72,9 @@ static int ipack_bus_remove(struct device *device) ...@@ -72,10 +72,9 @@ static int ipack_bus_remove(struct device *device)
struct ipack_device *dev = to_ipack_dev(device); struct ipack_device *dev = to_ipack_dev(device);
struct ipack_driver *drv = to_ipack_driver(device->driver); struct ipack_driver *drv = to_ipack_driver(device->driver);
if (!drv->ops->remove) if (drv->ops->remove)
return -EINVAL;
drv->ops->remove(dev); drv->ops->remove(dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment