Commit e842f9a
rapidio: add check for rio_add_net() in rio_scan_alloc_net()
The return value of rio_add_net() should be checked. If it fails,
put_device() should be called to free the memory and give up the reference
initialized in rio_add_net().
Link: https://lkml.kernel.org/r/[email protected]
Fixes: e6b585c ("rapidio: move net allocation into core code")
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Haoxiang Li <[email protected]>
Cc: Alexandre Bounine <[email protected]>
Cc: Matt Porter <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent b2ef51c commit e842f9a
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
874 | | - | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
875 | 878 | | |
876 | 879 | | |
877 | 880 | | |
| |||
0 commit comments