Skip to content

Commit a4cf11f

Browse files
krzkchanwoochoi
authored andcommitted
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>
1 parent 1f339f3 commit a4cf11f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/extcon/extcon-max77843.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
845845
max77843_extcon_cable);
846846
if (IS_ERR(info->edev)) {
847847
dev_err(&pdev->dev, "Failed to allocate memory for extcon\n");
848-
ret = -ENODEV;
848+
ret = PTR_ERR(info->edev);
849849
goto err_muic_irq;
850850
}
851851

0 commit comments

Comments
 (0)