Skip to content

Commit 0c31086

Browse files
Niklas Söderlundmchehab
authored andcommitted
media: rcar-csi2: Fix coccinelle warning for PTR_ERR_OR_ZERO()
Use the PTR_ERR_OR_ZERO() macro instead of construct: if (IS_ERR(foo)) return PTR_ERR(foo); return 0; Fixes: 3ae854cafd76 ("rcar-csi2: Use standby mode instead of resetting") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Niklas Söderlund <[email protected]> Reviewed-by: Ulrich Hecht <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 20059cb commit 0c31086

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/media/platform/rcar-vin/rcar-csi2.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,10 +1019,8 @@ static int rcsi2_probe_resources(struct rcar_csi2 *priv,
10191019
return ret;
10201020

10211021
priv->rstc = devm_reset_control_get(&pdev->dev, NULL);
1022-
if (IS_ERR(priv->rstc))
1023-
return PTR_ERR(priv->rstc);
10241022

1025-
return 0;
1023+
return PTR_ERR_OR_ZERO(priv->rstc);
10261024
}
10271025

10281026
static const struct rcar_csi2_info rcar_csi2_info_r8a7795 = {

0 commit comments

Comments
 (0)