[PATCH] drm/bridge: tc358764: fix ptr_ret.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>

drivers/gpu/drm/bridge/tc358764.c:385:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Sam Ravnborg <sam@xxxxxxxxxxxx>
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drm-bridge-support-drm-bridge-connector-helper-panel-updates/20200428-060830
base:   git://anongit.freedesktop.org/drm-intel for-linux-next

 tc358764.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -382,10 +382,7 @@ static int tc358764_parse_dt(struct tc35
 		return ret;
 
 	ctx->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
-	if (IS_ERR(ctx->panel_bridge))
-		return PTR_ERR(ctx->panel_bridge);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(ctx->panel_bridge);
 }
 
 static int tc358764_configure_regulators(struct tc358764 *ctx)
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux