Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: max77843: Return error code of extcon_dev_allocate()

devm_extcon_dev_allocate() can fail of multiple reasons. The call
returns proper error code on failure so pass it instead of fixed ENOMEM.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Krzysztof Kozlowski and committed by
Chanwoo Choi
a4cf11fa 1f339f33

+1 -1
+1 -1
drivers/extcon/extcon-max77843.c
··· 845 845 max77843_extcon_cable); 846 846 if (IS_ERR(info->edev)) { 847 847 dev_err(&pdev->dev, "Failed to allocate memory for extcon\n"); 848 - ret = -ENODEV; 848 + ret = PTR_ERR(info->edev); 849 849 goto err_muic_irq; 850 850 } 851 851