diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-20 06:04:39 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-23 02:43:09 -0500 |
commit | 00e79d12729e3b5a6b6d7a13eb2823cfff0761e4 (patch) | |
tree | 5b800935239c0890f00c44fe8d81b16894c7dd1c | |
parent | 7d8dd20e56be0196fd015feb19ca38449c607794 (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>
-rw-r--r-- | 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 e8dbb94494d3..554946356fba 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, | |||
800 | pcs = pinctrl_dev_get_drvdata(pctldev); | 800 | pcs = pinctrl_dev_get_drvdata(pctldev); |
801 | 801 | ||
802 | *map = devm_kzalloc(pcs->dev, sizeof(**map), GFP_KERNEL); | 802 | *map = devm_kzalloc(pcs->dev, sizeof(**map), GFP_KERNEL); |
803 | if (!map) | 803 | if (!*map) |
804 | return -ENOMEM; | 804 | return -ENOMEM; |
805 | 805 | ||
806 | *num_maps = 0; | 806 | *num_maps = 0; |