mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
aeb8753b68
commit
f7973d8ba0
@ -814,8 +814,5 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
|
||||
pmx->pctl_desc.npins = pfc->info->nr_pins;
|
||||
|
||||
pmx->pctl = devm_pinctrl_register(pfc->dev, &pmx->pctl_desc, pmx);
|
||||
if (IS_ERR(pmx->pctl))
|
||||
return PTR_ERR(pmx->pctl);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(pmx->pctl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user