extcon: max14577: Return error code of extcon_dev_allocate()
Subsystems (2)
Krzysztof Kozlowski
maintainerPATCH 1/4 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.
--- drivers/extcon/extcon-max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max14577.c +1 -1
@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev) max14577_extcon_cable);if (IS_ERR (info->edev)) {dev_err (&pdev->dev,"failed to allocate memory for extcon\n" ); -return -ENOMEM ; +return PTR_ERR (info->edev); } ret =devm_extcon_dev_register (&pdev->dev, info->edev);
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 4/4 extcon: max8997: 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.
--- drivers/extcon/extcon-max8997.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max8997.c +1 -1
@@ -674,7 +674,7 @@ static int max8997_muic_probe(struct platform_device *pdev) info->edev =devm_extcon_dev_allocate (&pdev->dev, max8997_extcon_cable);if (IS_ERR (info->edev)) {dev_err (&pdev->dev,"failed to allocate memory for extcon\n" ); - ret = -ENOMEM ; + ret =PTR_ERR (info->edev); goto err_irq; }
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 2/4 extcon: max77693: Return error code of extcon_dev_allocate()
In reply to Krzysztof Kozlowskidevm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM.
--- drivers/extcon/extcon-max77693.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max77693.c +1 -1
@@ -1157,7 +1157,7 @@ static int max77693_muic_probe(struct platform_device *pdev) max77693_extcon_cable);if (IS_ERR (info->edev)) {dev_err (&pdev->dev,"failed to allocate memory for extcon\n" ); -return -ENOMEM ; +return PTR_ERR (info->edev); } ret =devm_extcon_dev_register (&pdev->dev, info->edev);
Signature · 1 line
2.17.1
Krzysztof Kozlowski
maintainerPATCH 3/4 extcon: max77843: Return error code of extcon_dev_allocate()
In reply to Krzysztof Kozlowskidevm_extcon_dev_allocate() can fail of multiple reasons. The call returns proper error code on failure so pass it instead of fixed ENOMEM.
--- drivers/extcon/extcon-max77843.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-max77843.c +1 -1
@@ -845,7 +845,7 @@ static int max77843_muic_probe(struct platform_device *pdev) max77843_extcon_cable);if (IS_ERR (info->edev)) {dev_err (&pdev->dev,"Failed to allocate memory for extcon\n" ); - ret = -ENODEV ; + ret =PTR_ERR (info->edev); goto err_muic_irq; }
Signature · 1 line
2.17.1
Chanwoo Choi
AppliedQuoted 23 lines · Krzysztof Kozlowski
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 <[email protected]>--- drivers/extcon/extcon-max14577.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/extcon/extcon-max14577.c +1
-2@@ -713,7 +713,7 @@ static int max14577_muic_probe(struct platform_device *pdev) max14577_extcon_cable);if (IS_ERR (info->edev)) {dev_err (&pdev->dev,"failed to allocate memory for extcon\n" ); -return -ENOMEM ; +return PTR_ERR (info->edev); } ret =devm_extcon_dev_register (&pdev->dev, info->edev); --
Quoted 2 lines
2.17.1
Applied them for patch1-4. Thanks.
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics