linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
@ 2018-01-24  0:43 Gustavo A. R. Silva
  2018-01-25  0:14 ` Steve Longerbeam
  2018-01-25 10:51 ` Arnd Bergmann
  0 siblings, 2 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-24  0:43 UTC (permalink / raw)
  To: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Arnd Bergmann
  Cc: linux-media, devel, linux-kernel, 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")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/staging/media/imx/imx-media-vdic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c
index 433474d..ed35684 100644
--- a/drivers/staging/media/imx/imx-media-vdic.c
+++ b/drivers/staging/media/imx/imx-media-vdic.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-01-24  0:43 [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
@ 2018-01-25  0:14 ` Steve Longerbeam
  2018-02-14 20:57   ` Gustavo A. R. Silva
  2018-01-25 10:51 ` Arnd Bergmann
  1 sibling, 1 reply; 7+ messages in thread
From: Steve Longerbeam @ 2018-01-25  0:14 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Arnd Bergmann
  Cc: devel, Gustavo A. R. Silva, linux-kernel, linux-media

Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com>


On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote:
> 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")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>   drivers/staging/media/imx/imx-media-vdic.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-vdic.c b/drivers/staging/media/imx/imx-media-vdic.c
> index 433474d..ed35684 100644
> --- a/drivers/staging/media/imx/imx-media-vdic.c
> +++ b/drivers/staging/media/imx/imx-media-vdic.c
> @@ -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
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-01-24  0:43 [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
  2018-01-25  0:14 ` Steve Longerbeam
@ 2018-01-25 10:51 ` Arnd Bergmann
  2018-01-25 12:56   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2018-01-25 10:51 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Steve Longerbeam, Philipp Zabel, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Linux Media Mailing List, devel,
	Linux Kernel Mailing List, Gustavo A. R. Silva

On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
> 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")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

good catch!

Acked-by: Arnd Bergmann <arnd@arndb.de>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-01-25 10:51 ` Arnd Bergmann
@ 2018-01-25 12:56   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-25 12:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Gustavo A. R. Silva, Steve Longerbeam, Philipp Zabel,
	Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Linux Media Mailing List, devel, Linux Kernel Mailing List


Quoting Arnd Bergmann <arnd@arndb.de>:

> On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>> 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")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> good catch!
>

:)

> Acked-by: Arnd Bergmann <arnd@arndb.de>

Thanks, Arnd.
--
Gustavo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-01-25  0:14 ` Steve Longerbeam
@ 2018-02-14 20:57   ` Gustavo A. R. Silva
  2018-02-19 14:23     ` Philipp Zabel
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-02-14 20:57 UTC (permalink / raw)
  To: Steve Longerbeam, Gustavo A. R. Silva, Philipp Zabel,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Arnd Bergmann
  Cc: linux-media, devel, linux-kernel

Hi all,

I was just wondering about the status of this patch.

Thanks
--
Gustavo

On 01/24/2018 06:14 PM, Steve Longerbeam wrote:
> Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> 
> 
> On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote:
>> 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")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>>   drivers/staging/media/imx/imx-media-vdic.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/imx/imx-media-vdic.c 
>> b/drivers/staging/media/imx/imx-media-vdic.c
>> index 433474d..ed35684 100644
>> --- a/drivers/staging/media/imx/imx-media-vdic.c
>> +++ b/drivers/staging/media/imx/imx-media-vdic.c
>> @@ -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;
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-02-14 20:57   ` Gustavo A. R. Silva
@ 2018-02-19 14:23     ` Philipp Zabel
  2018-02-19 16:48       ` Gustavo A. R. Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2018-02-19 14:23 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Steve Longerbeam, Gustavo A. R. Silva,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Arnd Bergmann
  Cc: linux-media, devel, linux-kernel

Hi Gustavo,

On Wed, 2018-02-14 at 14:57 -0600, Gustavo A. R. Silva wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR
  2018-02-19 14:23     ` Philipp Zabel
@ 2018-02-19 16:48       ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-02-19 16:48 UTC (permalink / raw)
  To: Philipp Zabel, Steve Longerbeam, Gustavo A. R. Silva,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Arnd Bergmann
  Cc: linux-media, devel, linux-kernel

Hi Philipp,

On 02/19/2018 08:23 AM, Philipp Zabel wrote:
> Hi Gustavo,
> 
> On Wed, 2018-02-14 at 14:57 -0600, Gustavo A. R. Silva wrote:
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-19 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24  0:43 [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2018-01-25  0:14 ` Steve Longerbeam
2018-02-14 20:57   ` Gustavo A. R. Silva
2018-02-19 14:23     ` Philipp Zabel
2018-02-19 16:48       ` Gustavo A. R. Silva
2018-01-25 10:51 ` Arnd Bergmann
2018-01-25 12:56   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).