[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353409479-3304-1-git-send-email-sachin.kamat@linaro.org>
Date: Tue, 20 Nov 2012 16:34:39 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: linus.walleij@...aro.org, sachin.kamat@...aro.org,
patches@...aro.org
Subject: [PATCH 1/1] pinctrl: pinctrl-single: Fix error check condition
*map should be tested for NULL instead of map.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
---
drivers/pinctrl/pinctrl-single.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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;
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists