Skip to contentSkip to conversation

staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

PATCH In review Gustavo A. R. Silva 5 participants 7 messages Jan 24, 2018 – Feb 19, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch.

This issue was detected with the help of Coccinelle.

Fixes 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage")
---
 drivers/staging/media/imx/imx-media-vdic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-vdic.c +1 -1
index 433474d..ed35684 100644
@@ -177,7 +177,7 @@ static int vdic_get_ipu_resources(struct vdic_priv *priv)
 		priv->vdi_in_ch = ch;
 
 		ch = ipu_idmac_get(priv->ipu, IPUV3_CHANNEL_MEM_VDI_NEXT);
-		if (IS_ERR(priv->vdi_in_ch_n)) {
+		if (IS_ERR(ch)) {
 			err_chan = IPUV3_CHANNEL_MEM_VDI_NEXT;
 			ret = PTR_ERR(ch);
 			goto out_err_chan;
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch.

This issue was detected with the help of Coccinelle.

Fixes 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage")
---
  drivers/staging/media/imx/imx-media-vdic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-vdic.c +0 -0
index 433474d..ed35684 100644

drivers/staging/media/imx/imx-media-vdic.c static int vdic_get_ipu_resources(struct vdic_priv *priv) · line 183

Quoted 8 lines
drivers/staging/media/imx/imx-media-vdic.c +1 -1
@@ -177,7 +177,7 @@ static int vdic_get_ipu_resources(struct vdic_priv *priv)
  		priv->vdi_in_ch = ch;
 
  		ch = ipu_idmac_get(priv->ipu, IPUV3_CHANNEL_MEM_VDI_NEXT);
-		if (IS_ERR(priv->vdi_in_ch_n)) {
+		if (IS_ERR(ch)) {
  			err_chan = IPUV3_CHANNEL_MEM_VDI_NEXT;
  			ret = PTR_ERR(ch);
  			goto out_err_chan;

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#6 lore raw

Quoting Arnd Bergmann <[email protected]>:

Quoted 5 lines
Quoted 3 lines · Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch.

Quoted 7 lines
Quoted 4 lines

This issue was detected with the help of Coccinelle.

Fixes 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage")

good catch!

:)

Quoted 1 line

Thanks, Arnd.
--
Gustavo

#2 lore raw
In reply to Steve Longerbeam

Hi all,

I was just wondering about the status of this patch.

Thanks
--
Gustavo

Quoted 29 lines · Steve Longerbeam
Quoted 24 lines · Gustavo A. R. Silva

Fix inconsistent IS_ERR and PTR_ERR in vdic_get_ipu_resources. The proper pointer to be passed as argument is ch.

This issue was detected with the help of Coccinelle.

Fixes 0b2e9e7947e7 ("media: staging/imx: remove confusing IS_ERR_OR_NULL usage")

---
  drivers/staging/media/imx/imx-media-vdic.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/imx/imx-media-vdic.c +1 -1
index 433474d..ed35684 100644
@@ -177,7 +177,7 @@ static int vdic_get_ipu_resources(struct vdic_priv 
 *priv)
           priv->vdi_in_ch = ch;
           ch = ipu_idmac_get(priv->ipu, IPUV3_CHANNEL_MEM_VDI_NEXT);
-        if (IS_ERR(priv->vdi_in_ch_n)) {
+        if (IS_ERR(ch)) {
               err_chan = IPUV3_CHANNEL_MEM_VDI_NEXT;
               ret = PTR_ERR(ch);
               goto out_err_chan;
maintainer
#3 lore raw

Hi Gustavo,

Quoted 3 lines · Gustavo A. R. Silva

Hi all,

I was just wondering about the status of this patch.

It is en route as commit dcd71a9292b1 ("staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR") in Hans' for-v4.17a branch:
git://linuxtv.org/hverkuil/media_tree.git for-v4.17a

regards
Philipp

#4 lore raw

Hi Philipp,

Quoted 11 lines · Philipp Zabel

Hi Gustavo,

Quoted 3 lines · Gustavo A. R. Silva

Hi all,

I was just wondering about the status of this patch.

It is en route as commit dcd71a9292b1 ("staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR") in Hans' for-v4.17a branch:
git://linuxtv.org/hverkuil/media_tree.git for-v4.17a

Awesome.

Thanks for the info.
--
Gustavo