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>
This commit is contained in:
Sachin Kamat 2012-11-20 16:34:39 +05:30 committed by Linus Walleij
parent 7d8dd20e56
commit 00e79d1272

View File

@ -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;