[PATCH] drm/bridge: fix odd_ptr_err.cocci warnings

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

 



drivers/gpu/drm/bridge/cdns-dsi.c:980:5-11: inconsistent IS_ERR and PTR_ERR on line 981.

 PTR_ERR should access the value just tested by IS_ERR

Semantic patch information:
 There can be false positives in the patch case, where it is the call to
 IS_ERR that is wrong.

Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci

CC: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

Please take the patch only if it's a positive warning. Thanks!

 cdns-dsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/bridge/cdns-dsi.c
+++ b/drivers/gpu/drm/bridge/cdns-dsi.c
@@ -978,7 +978,7 @@ static int cdns_dsi_drm_probe(struct pla
 
 	dsi->sysclk = devm_clk_get(&pdev->dev, "sysclk");
 	if (IS_ERR(dsi->sysclk))
-		return PTR_ERR(dsi->pclk);
+		return PTR_ERR(dsi->sysclk);
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
_______________________________________________
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