extcon: Fix error handling in extcon_dev_register
stable inclusion from stable-5.10.28 commit 3b681a1c43b6e98d7ced5dc016d2afeb5a84993a bugzilla: 51779 -------------------------------- [ Upstream commit d3bdd1c3 ] When devm_kcalloc() fails, we should execute device_unregister() to unregister edev->dev from system. Fixes: 046050f6 ("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> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Acked-by:
Weilong Chen <chenweilong@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment