Commit 0edb555
Uwe Kleine-König
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
5c5a768 ("platform: Provide a remove callback that returns no value").
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>1 parent 45e7d78 commit 0edb555
2 files changed
Lines changed: 9 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
| 1423 | + | |
| 1424 | + | |
1431 | 1425 | | |
1432 | 1426 | | |
1433 | 1427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
246 | 243 | | |
247 | | - | |
248 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
| |||
0 commit comments