v6.11: platform: Make platform_driver::remove() return void
commit 0edb555a65d1ef047a9805051c36922b52a38a9d Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> AuthorDate: Mon Oct 9 12:37:26 2023 +0200 Commit: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> CommitDate: Mon May 27 10:34:35 2024 +0200 platform: Make platform_driver::remove() return void struct platform_driver::remove returning an integer made driver authors expect that returning an error code was proper error handling. However the driver core ignores the error and continues to remove the device because there is nothing the core could do anyhow and reentering the remove callback again is only calling for trouble. To prevent such wrong assumptions, change the return type of the remove callback to void. This was prepared by introducing an alternative remove callback returning void and converting all drivers to that. So .remove() can be changed without further changes in drivers. This corresponds to step b) of the plan outlined in commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value"). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
parent
899fdb1e5b
commit
f5710e9761
1 changed files with 2 additions and 2 deletions
|
@ -890,7 +890,7 @@ err:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int seeed_voice_card_remove(struct platform_device *pdev)
|
static void seeed_voice_card_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||||
struct seeed_card_data *priv = snd_soc_card_get_drvdata(card);
|
struct seeed_card_data *priv = snd_soc_card_get_drvdata(card);
|
||||||
|
@ -899,7 +899,7 @@ static int seeed_voice_card_remove(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
simple_util_clean_reference(card);
|
simple_util_clean_reference(card);
|
||||||
|
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct of_device_id seeed_voice_of_match[] = {
|
static const struct of_device_id seeed_voice_of_match[] = {
|
||||||
|
|
Loading…
Reference in a new issue