Skip to content

Commit

Permalink
sh-pfc: Fix return value check in sh_pfc_register_pinctrl()
Browse files Browse the repository at this point in the history
In case of error, the function pinctrl_register() returns NULL not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wei Yongjun authored and Laurent Pinchart committed Mar 15, 2013
1 parent a4b5a5e commit fd9d05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pinctrl/sh-pfc/pinctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
pmx->pctl_desc.npins = pfc->info->nr_pins;

pmx->pctl = pinctrl_register(&pmx->pctl_desc, pfc->dev, pmx);
if (IS_ERR(pmx->pctl))
return PTR_ERR(pmx->pctl);
if (pmx->pctl == NULL)
return -EINVAL;

return 0;
}
Expand Down

0 comments on commit fd9d05b

Please sign in to comment.