From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe()
Date: Wed, 27 Dec 2017 15:13:48 -0800 [thread overview]
Message-ID: <20171227231348.GG478@tuxbook> (raw)
In-Reply-To: <0d5eae19-c8f9-3280-e68e-419646535512@users.sourceforge.net>
On Wed 27 Dec 13:10 PST 2017, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Thank's Markus,
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/pinctrl/qcom/pinctrl-msm.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index 7a960590ecaa..495432f3341b 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -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;
> --
> 2.15.1
>
next prev parent reply other threads:[~2017-12-27 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 21:10 [PATCH] pinctrl: msm: Delete an error message for a failed memory allocation in msm_pinctrl_probe() SF Markus Elfring
2017-12-27 23:13 ` Bjorn Andersson [this message]
2017-12-28 12:41 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171227231348.GG478@tuxbook \
--to=bjorn.andersson@linaro.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox