pinctrl: pinctrl-single: Fix error check condition

*map should be tested for NULL instead of map.

Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Sachin Kamat 2012-11-20 16:34:39 +05:30 • committed by Linus Walleij
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;