Browse Source

pinctrl: samsung: Fix the pointer in PTR_ERR()

PTR_ERR should access the value just tested by IS_ERR

The semantic patch that makes this change is available
in scripts/coccinelle/tests/odd_ptr_err.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Fabio Estevam 10 years ago
parent
commit
44a074ffe0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/pinctrl/samsung/pinctrl-samsung.c

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

@@ -806,7 +806,7 @@ static int samsung_pinctrl_parse_dt(struct platform_device *pdev,
 	functions = samsung_pinctrl_create_functions(dev, drvdata, &func_cnt);
 	if (IS_ERR(functions)) {
 		dev_err(dev, "failed to parse pin functions\n");
-		return PTR_ERR(groups);
+		return PTR_ERR(functions);
 	}
 
 	drvdata->pin_groups = groups;