mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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:
parent
7d8dd20e56
commit
00e79d1272
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user