Skip to content

Commit 4e984d8

Browse files
krzkchanwoochoi
authored andcommitted
extcon: max14577: 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 ea6a95d commit 4e984d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/extcon/extcon-max14577.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
713713
max14577_extcon_cable);
714714
if (IS_ERR(info->edev)) {
715715
dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
716-
return -ENOMEM;
716+
return PTR_ERR(info->edev);
717717
}
718718

719719
ret = devm_extcon_dev_register(&pdev->dev, info->edev);

0 commit comments

Comments
 (0)