Commit c6ad161
extcon: Fix error handling in extcon_dev_register
BugLink: https://bugs.launchpad.net/bugs/1923869
[ Upstream commit d3bdd1c ]
When devm_kcalloc() fails, we should execute device_unregister()
to unregister edev->dev from system.
Fixes: 046050f ("extcon: Update the prototype of extcon_register_notifier() with enum extcon")
Signed-off-by: Dinghao Liu <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Kamal Mostafa <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>1 parent a51de0f commit c6ad161
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
| 1244 | + | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
| |||
0 commit comments