Commit 7b0a271
usb: gadget: gadgetfs: unregister gadget only if it got successfully registered
Gadgetfs driver called usb_gadget_unregister_driver unconditionally, even
if it didn't register it earlier due to other failures. This patch fixes
this.
Reported-by: Vegard Nossum <[email protected]>
Signed-off-by: Marek Szyprowski <[email protected]>
Tested-by: Vegard Nossum <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>1 parent 31b994a commit 7b0a271
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
1179 | 1180 | | |
1180 | 1181 | | |
1181 | 1182 | | |
1182 | | - | |
| 1183 | + | |
| 1184 | + | |
1183 | 1185 | | |
1184 | 1186 | | |
1185 | 1187 | | |
| |||
1847 | 1849 | | |
1848 | 1850 | | |
1849 | 1851 | | |
| 1852 | + | |
1850 | 1853 | | |
1851 | 1854 | | |
1852 | 1855 | | |
| |||
0 commit comments