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

usb: misc: onboard_hub: Don't warn twice about problems during remove

If onboard_hub_power_off() called by onboard_hub_remove() fails it emits
an error message. Forwarding the returned error value to the driver core
results in another error message. As the return value is otherwise
ignored, just drop the return value. There is no side effect apart from
suppressing the core's warning.

Instead of returning zero unconditionally, convert to .remove_new()
which has the same semantics as .remove() that unconditionally returns
zero.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230530073633.2193618-1-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04689510
......@@ -278,7 +278,7 @@ static int onboard_hub_probe(struct platform_device *pdev)
return 0;
}
static int onboard_hub_remove(struct platform_device *pdev)
static void onboard_hub_remove(struct platform_device *pdev)
{
struct onboard_hub *hub = dev_get_drvdata(&pdev->dev);
struct usbdev_node *node;
......@@ -306,7 +306,7 @@ static int onboard_hub_remove(struct platform_device *pdev)
mutex_unlock(&hub->lock);
return onboard_hub_power_off(hub);
onboard_hub_power_off(hub);
}
MODULE_DEVICE_TABLE(of, onboard_hub_match);
......@@ -317,7 +317,7 @@ static const struct dev_pm_ops __maybe_unused onboard_hub_pm_ops = {
static struct platform_driver onboard_hub_driver = {
.probe = onboard_hub_probe,
.remove = onboard_hub_remove,
.remove_new = onboard_hub_remove,
.driver = {
.name = "onboard-usb-hub",
......
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