Commit 00e79d12 authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Walleij

pinctrl: pinctrl-single: Fix error check condition

*map should be tested for NULL instead of map.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7d8dd20e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment