diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-20 15:04:39 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-23 11:43:09 +0400 |
commit | 00e79d12729e3b5a6b6d7a13eb2823cfff0761e4 (patch) | |
tree | 5b800935239c0890f00c44fe8d81b16894c7dd1c /drivers/pinctrl | |
parent | 7d8dd20e56be0196fd015feb19ca38449c607794 (diff) | |
download | linux-00e79d12729e3b5a6b6d7a13eb2823cfff0761e4.tar.xz |
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')
-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, pcs = pinctrl_dev_get_drvdata(pctldev); *map = devm_kzalloc(pcs->dev, sizeof(**map), GFP_KERNEL); - if (!map) + if (!*map) return -ENOMEM; *num_maps = 0; |