All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Tiffany Lin <tiffany.lin@mediatek.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	linux-media@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	kbuild-all@01.org
Subject: [PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings
Date: Tue, 6 Sep 2016 22:51:15 +0800 (SGT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1609062249430.3144@hadrien> (raw)

PTR_ERR should access the value just tested by IS_ERR

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

CC: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -255,7 +255,7 @@ static int mtk_vcodec_probe(struct platf
 		}
 		dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR((__force void *)dev->reg_base[i])) {
-			ret = PTR_ERR((__force void *)dev->reg_base);
+			ret = PTR_ERR((__force void *)dev->reg_base[i]);
 			goto err_res;
 		}
 		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);

WARNING: multiple messages have this Message-ID (diff)
From: julia.lawall@lip6.fr (Julia Lawall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings
Date: Tue, 6 Sep 2016 22:51:15 +0800 (SGT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1609062249430.3144@hadrien> (raw)

PTR_ERR should access the value just tested by IS_ERR

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

CC: Tiffany Lin <tiffany.lin@mediatek.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -255,7 +255,7 @@ static int mtk_vcodec_probe(struct platf
 		}
 		dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR((__force void *)dev->reg_base[i])) {
-			ret = PTR_ERR((__force void *)dev->reg_base);
+			ret = PTR_ERR((__force void *)dev->reg_base[i]);
 			goto err_res;
 		}
 		mtk_v4l2_debug(2, "reg[%d] base=%p", i, dev->reg_base[i]);

             reply	other threads:[~2016-09-06 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:51 Julia Lawall [this message]
2016-09-06 14:51 ` [PATCH] vcodec: mediatek: fix odd_ptr_err.cocci warnings Julia Lawall
2016-09-07  5:25 ` Tiffany Lin
2016-09-07  5:25   ` Tiffany Lin
2016-09-07  5:25   ` Tiffany Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1609062249430.3144@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=m.chehab@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=tiffany.lin@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.