Skip to content

Commit

Permalink
hwspinlock: omap: Emit only one error message for errors in .remove()
Browse files Browse the repository at this point in the history
If a remove callback of a platform driver returns a non-zero value, the
driver core emits an error message, otherwise ignores the value and
completes unbinding the device.

As omap_hwspinlock_remove() already emits an error message, suppress the
core's error message by returning zero.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230314180100.2865801-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
  • Loading branch information
Uwe Kleine-König authored and Bjorn Andersson committed Jul 15, 2023
1 parent 3c81195 commit 72a3a50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwspinlock/omap_hwspinlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int omap_hwspinlock_remove(struct platform_device *pdev)
ret = hwspin_lock_unregister(bank);
if (ret) {
dev_err(&pdev->dev, "%s failed: %d\n", __func__, ret);
return ret;
return 0;
}

pm_runtime_disable(&pdev->dev);
Expand Down

0 comments on commit 72a3a50

Please sign in to comment.