All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
  2021-05-24 13:35 ` Wei Yongjun
@ 2021-05-24 13:27   ` Dmitry Osipenko
  -1 siblings, 0 replies; 8+ messages in thread
From: Dmitry Osipenko @ 2021-05-24 13:27 UTC (permalink / raw)
  To: Wei Yongjun, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-media, linux-tegra, linux-staging, dri-devel,
	linaro-mm-sig, kernel-janitors, Hulk Robot

24.05.2021 16:35, Wei Yongjun пишет:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/staging/media/tegra-vde/vde.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
> index e025b69776f2..321d14ba2e56 100644
> --- a/drivers/staging/media/tegra-vde/vde.c
> +++ b/drivers/staging/media/tegra-vde/vde.c
> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>  	 * power-cycle it in order to put hardware into a predictable lower
>  	 * power state.
>  	 */
> -	if (pm_runtime_resume_and_get(dev) < 0)
> +	err = pm_runtime_resume_and_get(dev);
> +	if (err < 0)
>  		goto err_pm_runtime;
>  
>  	pm_runtime_put(dev);
> 

pm_runtime_resume_and_get() doesn't return positive values, the previous
variant was okay.

You should also version your patches and add changelog.

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

* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
@ 2021-05-24 13:27   ` Dmitry Osipenko
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Osipenko @ 2021-05-24 13:27 UTC (permalink / raw)
  To: Wei Yongjun, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-staging, kernel-janitors, dri-devel, linaro-mm-sig,
	Hulk Robot, linux-tegra, linux-media

24.05.2021 16:35, Wei Yongjun пишет:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/staging/media/tegra-vde/vde.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
> index e025b69776f2..321d14ba2e56 100644
> --- a/drivers/staging/media/tegra-vde/vde.c
> +++ b/drivers/staging/media/tegra-vde/vde.c
> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>  	 * power-cycle it in order to put hardware into a predictable lower
>  	 * power state.
>  	 */
> -	if (pm_runtime_resume_and_get(dev) < 0)
> +	err = pm_runtime_resume_and_get(dev);
> +	if (err < 0)
>  		goto err_pm_runtime;
>  
>  	pm_runtime_put(dev);
> 

pm_runtime_resume_and_get() doesn't return positive values, the previous
variant was okay.

You should also version your patches and add changelog.

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

* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
  2021-05-24 13:27   ` Dmitry Osipenko
@ 2021-05-24 13:29     ` Dmitry Osipenko
  -1 siblings, 0 replies; 8+ messages in thread
From: Dmitry Osipenko @ 2021-05-24 13:29 UTC (permalink / raw)
  To: Wei Yongjun, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-media, linux-tegra, linux-staging, dri-devel,
	linaro-mm-sig, kernel-janitors, Hulk Robot

24.05.2021 16:27, Dmitry Osipenko пишет:
> 24.05.2021 16:35, Wei Yongjun пишет:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> ---
>>  drivers/staging/media/tegra-vde/vde.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
>> index e025b69776f2..321d14ba2e56 100644
>> --- a/drivers/staging/media/tegra-vde/vde.c
>> +++ b/drivers/staging/media/tegra-vde/vde.c
>> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>>  	 * power-cycle it in order to put hardware into a predictable lower
>>  	 * power state.
>>  	 */
>> -	if (pm_runtime_resume_and_get(dev) < 0)
>> +	err = pm_runtime_resume_and_get(dev);
>> +	if (err < 0)
>>  		goto err_pm_runtime;
>>  
>>  	pm_runtime_put(dev);
>>
> 
> pm_runtime_resume_and_get() doesn't return positive values, the previous
> variant was okay.
> 
> You should also version your patches and add changelog.
> 

Ah, sorry. The other patch is from Yang Yingliang.

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

* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
@ 2021-05-24 13:29     ` Dmitry Osipenko
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Osipenko @ 2021-05-24 13:29 UTC (permalink / raw)
  To: Wei Yongjun, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-staging, kernel-janitors, dri-devel, linaro-mm-sig,
	Hulk Robot, linux-tegra, linux-media

24.05.2021 16:27, Dmitry Osipenko пишет:
> 24.05.2021 16:35, Wei Yongjun пишет:
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>> ---
>>  drivers/staging/media/tegra-vde/vde.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
>> index e025b69776f2..321d14ba2e56 100644
>> --- a/drivers/staging/media/tegra-vde/vde.c
>> +++ b/drivers/staging/media/tegra-vde/vde.c
>> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>>  	 * power-cycle it in order to put hardware into a predictable lower
>>  	 * power state.
>>  	 */
>> -	if (pm_runtime_resume_and_get(dev) < 0)
>> +	err = pm_runtime_resume_and_get(dev);
>> +	if (err < 0)
>>  		goto err_pm_runtime;
>>  
>>  	pm_runtime_put(dev);
>>
> 
> pm_runtime_resume_and_get() doesn't return positive values, the previous
> variant was okay.
> 
> You should also version your patches and add changelog.
> 

Ah, sorry. The other patch is from Yang Yingliang.

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

* [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
@ 2021-05-24 13:35 ` Wei Yongjun
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Yongjun @ 2021-05-24 13:35 UTC (permalink / raw)
  To: weiyongjun1, Mauro Carvalho Chehab, Dmitry Osipenko,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Thierry Reding,
	Jonathan Hunter, Philipp Zabel, Sumit Semwal,
	Christian König
  Cc: linux-media, linux-tegra, linux-staging, dri-devel,
	linaro-mm-sig, kernel-janitors, Hulk Robot

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/media/tegra-vde/vde.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
index e025b69776f2..321d14ba2e56 100644
--- a/drivers/staging/media/tegra-vde/vde.c
+++ b/drivers/staging/media/tegra-vde/vde.c
@@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
 	 * power-cycle it in order to put hardware into a predictable lower
 	 * power state.
 	 */
-	if (pm_runtime_resume_and_get(dev) < 0)
+	err = pm_runtime_resume_and_get(dev);
+	if (err < 0)
 		goto err_pm_runtime;
 
 	pm_runtime_put(dev);


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

* [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
@ 2021-05-24 13:35 ` Wei Yongjun
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Yongjun @ 2021-05-24 13:35 UTC (permalink / raw)
  To: weiyongjun1, Mauro Carvalho Chehab, Dmitry Osipenko,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, Thierry Reding,
	Jonathan Hunter, Philipp Zabel, Sumit Semwal,
	Christian König
  Cc: linux-staging, kernel-janitors, dri-devel, linaro-mm-sig,
	Hulk Robot, linux-tegra, linux-media

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/staging/media/tegra-vde/vde.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
index e025b69776f2..321d14ba2e56 100644
--- a/drivers/staging/media/tegra-vde/vde.c
+++ b/drivers/staging/media/tegra-vde/vde.c
@@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
 	 * power-cycle it in order to put hardware into a predictable lower
 	 * power state.
 	 */
-	if (pm_runtime_resume_and_get(dev) < 0)
+	err = pm_runtime_resume_and_get(dev);
+	if (err < 0)
 		goto err_pm_runtime;
 
 	pm_runtime_put(dev);


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

* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
  2021-05-24 13:29     ` Dmitry Osipenko
@ 2021-05-24 13:36       ` weiyongjun (A)
  -1 siblings, 0 replies; 8+ messages in thread
From: weiyongjun (A) @ 2021-05-24 13:36 UTC (permalink / raw)
  To: Dmitry Osipenko, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-media, linux-tegra, linux-staging, dri-devel,
	linaro-mm-sig, kernel-janitors, Hulk Robot


> 24.05.2021 16:27, Dmitry Osipenko пишет:
>> 24.05.2021 16:35, Wei Yongjun пишет:
>>> Fix to return a negative error code from the error handling
>>> case instead of 0, as done elsewhere in this function.
>>>
>>> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>>> ---
>>>   drivers/staging/media/tegra-vde/vde.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
>>> index e025b69776f2..321d14ba2e56 100644
>>> --- a/drivers/staging/media/tegra-vde/vde.c
>>> +++ b/drivers/staging/media/tegra-vde/vde.c
>>> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>>>   	 * power-cycle it in order to put hardware into a predictable lower
>>>   	 * power state.
>>>   	 */
>>> -	if (pm_runtime_resume_and_get(dev) < 0)
>>> +	err = pm_runtime_resume_and_get(dev);
>>> +	if (err < 0)
>>>   		goto err_pm_runtime;
>>>   
>>>   	pm_runtime_put(dev);
>>>
>> pm_runtime_resume_and_get() doesn't return positive values, the previous
>> variant was okay.
>>
>> You should also version your patches and add changelog.
>>
> Ah, sorry. The other patch is from Yang Yingliang.


Sorry, it is my bad. I missed that patch.


Regards,

Wei Yongjun


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

* Re: [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe()
@ 2021-05-24 13:36       ` weiyongjun (A)
  0 siblings, 0 replies; 8+ messages in thread
From: weiyongjun (A) @ 2021-05-24 13:36 UTC (permalink / raw)
  To: Dmitry Osipenko, Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Thierry Reding, Jonathan Hunter,
	Philipp Zabel, Sumit Semwal, Christian König
  Cc: linux-staging, kernel-janitors, dri-devel, linaro-mm-sig,
	Hulk Robot, linux-tegra, linux-media


> 24.05.2021 16:27, Dmitry Osipenko пишет:
>> 24.05.2021 16:35, Wei Yongjun пишет:
>>> Fix to return a negative error code from the error handling
>>> case instead of 0, as done elsewhere in this function.
>>>
>>> Fixes: dc8276b78917 ("staging: media: tegra-vde: use pm_runtime_resume_and_get()")
>>> Reported-by: Hulk Robot <hulkci@huawei.com>
>>> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
>>> ---
>>>   drivers/staging/media/tegra-vde/vde.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c
>>> index e025b69776f2..321d14ba2e56 100644
>>> --- a/drivers/staging/media/tegra-vde/vde.c
>>> +++ b/drivers/staging/media/tegra-vde/vde.c
>>> @@ -1071,7 +1071,8 @@ static int tegra_vde_probe(struct platform_device *pdev)
>>>   	 * power-cycle it in order to put hardware into a predictable lower
>>>   	 * power state.
>>>   	 */
>>> -	if (pm_runtime_resume_and_get(dev) < 0)
>>> +	err = pm_runtime_resume_and_get(dev);
>>> +	if (err < 0)
>>>   		goto err_pm_runtime;
>>>   
>>>   	pm_runtime_put(dev);
>>>
>> pm_runtime_resume_and_get() doesn't return positive values, the previous
>> variant was okay.
>>
>> You should also version your patches and add changelog.
>>
> Ah, sorry. The other patch is from Yang Yingliang.


Sorry, it is my bad. I missed that patch.


Regards,

Wei Yongjun


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

end of thread, other threads:[~2021-05-24 13:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 13:35 [PATCH -next] media: staging: tegra-vde: Fix error return code in tegra_vde_probe() Wei Yongjun
2021-05-24 13:35 ` Wei Yongjun
2021-05-24 13:27 ` Dmitry Osipenko
2021-05-24 13:27   ` Dmitry Osipenko
2021-05-24 13:29   ` Dmitry Osipenko
2021-05-24 13:29     ` Dmitry Osipenko
2021-05-24 13:36     ` weiyongjun (A)
2021-05-24 13:36       ` weiyongjun (A)

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.