From: Himanshu Jha Date: Tue, 29 Aug 2017 13:43:18 +0000 (+0530) Subject: remoteproc: qcom: Use PTR_ERR_OR_ZERO X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c76929b3c695305c1055d7e7c935d35b5fd275be;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git remoteproc: qcom: Use PTR_ERR_OR_ZERO Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: Himanshu Jha Signed-off-by: Bjorn Andersson --- diff --git a/drivers/remoteproc/qcom_adsp_pil.c b/drivers/remoteproc/qcom_adsp_pil.c index a41d399766fd..d01a8daf948a 100644 --- a/drivers/remoteproc/qcom_adsp_pil.c +++ b/drivers/remoteproc/qcom_adsp_pil.c @@ -268,10 +268,7 @@ static int adsp_init_regulator(struct qcom_adsp *adsp) regulator_set_load(adsp->cx_supply, 100000); adsp->px_supply = devm_regulator_get(adsp->dev, "px"); - if (IS_ERR(adsp->px_supply)) - return PTR_ERR(adsp->px_supply); - - return 0; + return PTR_ERR_OR_ZERO(adsp->px_supply); } static int adsp_request_irq(struct qcom_adsp *adsp, diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 31b8291dfc8b..7b40b79f8d9c 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -55,7 +55,7 @@ static int smd_subdev_probe(struct rproc_subdev *subdev) smd->edge = qcom_smd_register_edge(smd->dev, smd->node); - return IS_ERR(smd->edge) ? PTR_ERR(smd->edge) : 0; + return PTR_ERR_OR_ZERO(smd->edge); } static void smd_subdev_remove(struct rproc_subdev *subdev)