pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe()
Subsystems (6)
PATCH 1/1 pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe()
From: Markus Elfring <[email protected]>
Date: Wed, 27 Dec 2017 22:04:22 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
--- drivers/pinctrl/qcom/pinctrl-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pinctrl/qcom/pinctrl-msm.c +2 -3
@@ -898,10 +898,9 @@ int msm_pinctrl_probe(struct platform_device *pdev,int ret; pctrl =devm_kzalloc (&pdev->dev,sizeof (*pctrl),GFP_KERNEL ); -if (!pctrl) { -dev_err (&pdev->dev,"Can't allocate msm_pinctrl\n" ); +if (!pctrl)return -ENOMEM ; - } + pctrl->dev = &pdev->dev; pctrl->soc = soc_data; pctrl->chip = msm_gpio_template;
Signature · 1 line
2.15.1
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 27 Dec 2017 22:04:22 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Thank's Markus,
Regards,
Bjorn
Quoted 24 lines
--- drivers/pinctrl/qcom/pinctrl-msm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/pinctrl/qcom/pinctrl-msm.c +2
-3@@ -898,10 +898,9 @@ int msm_pinctrl_probe(struct platform_device *pdev,int ret; pctrl =devm_kzalloc (&pdev->dev,sizeof (*pctrl),GFP_KERNEL ); -if (!pctrl) { -dev_err (&pdev->dev,"Can't allocate msm_pinctrl\n" ); +if (!pctrl)return -ENOMEM ; - } + pctrl->dev = &pdev->dev; pctrl->soc = soc_data; pctrl->chip = msm_gpio_template;Signature · 1 line
2.15.1
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 27 Dec 2017 22:04:22 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Patch applied with Björn's ACK.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html