public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Dong Aisheng" <aisheng.dong@nxp.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Stefan Agner" <stefan@agner.ch>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"NXP Linux Team" <linux-imx@nxp.com>,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Abel Vesa" <abel.vesa@nxp.com>
Subject: [PATCH] pinctrl: imx: fix allocation result check
Date: Wed, 22 Dec 2021 22:28:07 +0100	[thread overview]
Message-ID: <20211222212807.27122-1-zajec5@gmail.com> (raw)

From: Rafał Miłecki <rafal@milecki.pl>

Fix code to check correct variable value.

Reported-by: Abel Vesa <abel.vesa@nxp.com>
Fixes: 02f117134952 ("pinctrl: imx: prepare for making "group_names" in "function_desc" const")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
Linus: I'm not sure if you can rebase your tree. Treat it as separated
patch or fixup. Depending on how to manage your repository.
---
 drivers/pinctrl/freescale/pinctrl-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 47b2ab1a14d0..16bc1bfc03e4 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -667,7 +667,7 @@ static int imx_pinctrl_parse_functions(struct device_node *np,
 
 	group_names = devm_kcalloc(ipctl->dev, func->num_group_names,
 				   sizeof(char *), GFP_KERNEL);
-	if (!func->group_names)
+	if (!group_names)
 		return -ENOMEM;
 	for_each_child_of_node(np, child)
 		group_names[i] = child->name;
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-12-22 21:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 21:28 Rafał Miłecki [this message]
2021-12-23  7:56 ` [PATCH] pinctrl: imx: fix allocation result check Abel Vesa
2021-12-23 17:18   ` Fabio Estevam
2021-12-26  3:20 ` 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=20211222212807.27122-1-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=abel.vesa@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=rafal@milecki.pl \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    /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