Skip to content

Commit

Permalink
pinctrl: pinctrl-single: Fix error check condition
Browse files Browse the repository at this point in the history
*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>
  • Loading branch information
Sachin Kamat authored and Linus Walleij committed Nov 23, 2012
1 parent 7d8dd20 commit 00e79d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-single.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 00e79d1

Please sign in to comment.