commit | 6e65e0fbe1906e094131851bf76b0efc16f0f63c | [log] [tgz] |
---|---|---|
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | Tue Jan 19 16:10:55 2021 +0800 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Wed Apr 07 12:05:40 2021 +0200 |
tree | 20331db200789079f6a59ea324ad2c3169ee3cf7 | |
parent | 869d286703e6ab3e87fab3d460dfe3011f8407c0 [diff] |
extcon: Fix error handling in extcon_dev_register [ Upstream commit d3bdd1c3140724967ca4136755538fa7c05c2b4e ] When devm_kcalloc() fails, we should execute device_unregister() to unregister edev->dev from system. Fixes: 046050f6e623e ("extcon: Update the prototype of extcon_register_notifier() with enum extcon") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org>