summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-single.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-20 16:34:39 +0530
committerLinus Walleij <linus.walleij@linaro.org>2012-11-23 08:43:09 +0100
commit00e79d12729e3b5a6b6d7a13eb2823cfff0761e4 (patch)
tree5b800935239c0890f00c44fe8d81b16894c7dd1c /drivers/pinctrl/pinctrl-single.c
parent7d8dd20e56be0196fd015feb19ca38449c607794 (diff)
pinctrl: pinctrl-single: Fix error check condition
*map should be tested for NULL instead of map. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r--drivers/pinctrl/pinctrl-single.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index e8dbb94494d..554946356fb 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -800,7 +800,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;