diff mbox

[1/1] pinctrl: pinctrl-single: Fix error check condition

Message ID 1353409479-3304-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Nov. 20, 2012, 11:04 a.m. UTC
*map should be tested for NULL instead of map.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pinctrl/pinctrl-single.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Linus Walleij Nov. 23, 2012, 7:44 a.m. UTC | #1
On Tue, Nov 20, 2012 at 12:04 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:

> *map should be tested for NULL instead of map.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Thanks, patch applied.

As we are late in the kernel cycle and I haven't seen reports about
regressions on this, it will wait for kernel v3.8.

Yours,
Linus Walleij
Sachin Kamat Nov. 23, 2012, 8:06 a.m. UTC | #2
On 23 November 2012 13:14, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Nov 20, 2012 at 12:04 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>
>> *map should be tested for NULL instead of map.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>
> Thanks, patch applied.
>
Thanks

> As we are late in the kernel cycle and I haven't seen reports about
> regressions on this, it will wait for kernel v3.8.

OK.

>
> Yours,
> Linus Walleij
diff mbox

Patch

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 726a729..3fc2a22 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -772,7 +772,7 @@  static int pcs_dt_node_to_map(struct pinctrl_dev *pctldev,
 	pcs = pinctrl_dev_get_drvdata(pctldev);
 
 	*map = devm_kzalloc(pcs->dev, sizeof(**map), GFP_KERNEL);
-	if (!map)
+	if (!*map)
 		return -ENOMEM;
 
 	*num_maps = 0;