Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7973d8b authored by Wei Yongjun's avatar Wei Yongjun Committed by Linus Walleij
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent aeb8753b
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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);
}