Commit 8cd6d0a
scsi: hisi_sas: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored and
this typically results in resource leaks. To improve here there is a quest
to make the remove callback return void. In the first step of this quest
all drivers are converted to .remove_new() which already returns void.
hisi_sas_remove() returned zero unconditionally so this was changed to
return void. Then it has the right prototype to be used directly as remove
callback for the two hisi_sas drivers.
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>1 parent a48e2c3 commit 8cd6d0a
File tree
4 files changed
+4
-15
lines changed- drivers/scsi/hisi_sas
4 files changed
+4
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2560 | 2560 | | |
2561 | 2561 | | |
2562 | 2562 | | |
2563 | | - | |
| 2563 | + | |
2564 | 2564 | | |
2565 | 2565 | | |
2566 | 2566 | | |
| |||
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | | - | |
2577 | 2576 | | |
2578 | 2577 | | |
2579 | 2578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1790 | 1790 | | |
1791 | 1791 | | |
1792 | 1792 | | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
1797 | | - | |
1798 | 1793 | | |
1799 | 1794 | | |
1800 | 1795 | | |
| |||
1810 | 1805 | | |
1811 | 1806 | | |
1812 | 1807 | | |
1813 | | - | |
| 1808 | + | |
1814 | 1809 | | |
1815 | 1810 | | |
1816 | 1811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3619 | 3619 | | |
3620 | 3620 | | |
3621 | 3621 | | |
3622 | | - | |
3623 | | - | |
3624 | | - | |
3625 | | - | |
3626 | | - | |
3627 | 3622 | | |
3628 | 3623 | | |
3629 | 3624 | | |
| |||
3640 | 3635 | | |
3641 | 3636 | | |
3642 | 3637 | | |
3643 | | - | |
| 3638 | + | |
3644 | 3639 | | |
3645 | 3640 | | |
3646 | 3641 | | |
| |||
0 commit comments