2018-01-24 00:44:22

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH] 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")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
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



2018-01-25 00:15:09

by Steve Longerbeam

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

Acked-by: Steve Longerbeam <[email protected]>


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 <[email protected]>
> ---
> 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;


2018-01-25 10:52:18

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva
<[email protected]> 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 <[email protected]>

good catch!

Acked-by: Arnd Bergmann <[email protected]>

2018-01-25 13:44:39

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR


Quoting Arnd Bergmann <[email protected]>:

> On Wed, Jan 24, 2018 at 1:43 AM, Gustavo A. R. Silva
> <[email protected]> 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 <[email protected]>
>
> good catch!
>

:)

> Acked-by: Arnd Bergmann <[email protected]>

Thanks, Arnd.
--
Gustavo





2018-02-14 20:58:28

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

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 <[email protected]>
>
>
> 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 <[email protected]>
>> ---
>>   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;
>


2018-02-19 14:25:17

by Philipp Zabel

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

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

2018-02-19 16:49:11

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

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