Skip to content

Commit f7973d8

Browse files
Wei Yongjunlinusw
authored andcommitted
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 <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent aeb8753 commit f7973d8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/pinctrl/sh-pfc/pinctrl.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,5 @@ int sh_pfc_register_pinctrl(struct sh_pfc *pfc)
814814
pmx->pctl_desc.npins = pfc->info->nr_pins;
815815

816816
pmx->pctl = devm_pinctrl_register(pfc->dev, &pmx->pctl_desc, pmx);
817-
if (IS_ERR(pmx->pctl))
818-
return PTR_ERR(pmx->pctl);
819-
820-
return 0;
817+
return PTR_ERR_OR_ZERO(pmx->pctl);
821818
}

0 commit comments

Comments
 (0)