浏览代码

pinctrl: mvebu: testing the wrong variable

We wanted to test "*map" here instead of "map".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Dan Carpenter 12 年之前
父节点
当前提交
ddb6c45fb7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/pinctrl/mvebu/pinctrl-mvebu.c

+ 1 - 1
drivers/pinctrl/mvebu/pinctrl-mvebu.c

@@ -444,7 +444,7 @@ static int mvebu_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
 	}
 
 	*map = kmalloc(nmaps * sizeof(struct pinctrl_map), GFP_KERNEL);
-	if (map == NULL) {
+	if (*map == NULL) {
 		dev_err(pctl->dev,
 			"cannot allocate pinctrl_map memory for %s\n",
 			np->name);