* [PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()
@ 2017-01-31 14:24 Jyri Sarha
2017-01-31 15:46 ` Gabriel Krisman Bertazi
0 siblings, 1 reply; 3+ messages in thread
From: Jyri Sarha @ 2017-01-31 14:24 UTC (permalink / raw)
To: dri-devel; +Cc: tomi.valkeinen, Jyri Sarha, laurent.pinchart
Fix badly hardcoded return return value from under fail-label. All
goto branches to the label set the "ret"-variable accordingly.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index 3a763f7..fa9fff3 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -1027,5 +1027,5 @@ int tilcdc_crtc_create(struct drm_device *dev)
fail:
tilcdc_crtc_destroy(crtc);
- return -ENOMEM;
+ return -ret;
}
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()
2017-01-31 14:24 [PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create() Jyri Sarha
@ 2017-01-31 15:46 ` Gabriel Krisman Bertazi
2017-01-31 17:01 ` Jyri Sarha
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Krisman Bertazi @ 2017-01-31 15:46 UTC (permalink / raw)
To: Jyri Sarha; +Cc: tomi.valkeinen, laurent.pinchart, dri-devel
Jyri Sarha <jsarha@ti.com> writes:
> Fix badly hardcoded return return value from under fail-label. All
> goto branches to the label set the "ret"-variable accordingly.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 3a763f7..fa9fff3 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -1027,5 +1027,5 @@ int tilcdc_crtc_create(struct drm_device *dev)
>
> fail:
> tilcdc_crtc_destroy(crtc);
> - return -ENOMEM;
> + return -ret;
Hi,
Shouldn't it read ret instead of -ret? The places that set ret
already make it negative, while turning it positive looks like would
fail the verification done by the caller.
--
Gabriel Krisman Bertazi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()
2017-01-31 15:46 ` Gabriel Krisman Bertazi
@ 2017-01-31 17:01 ` Jyri Sarha
0 siblings, 0 replies; 3+ messages in thread
From: Jyri Sarha @ 2017-01-31 17:01 UTC (permalink / raw)
To: Gabriel Krisman Bertazi; +Cc: tomi.valkeinen, laurent.pinchart, dri-devel
On 01/31/17 17:46, Gabriel Krisman Bertazi wrote:
> Jyri Sarha <jsarha@ti.com> writes:
>
>> Fix badly hardcoded return return value from under fail-label. All
>> goto branches to the label set the "ret"-variable accordingly.
>>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
>> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> index 3a763f7..fa9fff3 100644
>> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
>> @@ -1027,5 +1027,5 @@ int tilcdc_crtc_create(struct drm_device *dev)
>>
>> fail:
>> tilcdc_crtc_destroy(crtc);
>> - return -ENOMEM;
>> + return -ret;
>
> Hi,
>
> Shouldn't it read ret instead of -ret? The places that set ret
> already make it negative, while turning it positive looks like would
> fail the verification done by the caller.
>
Argh.. sorry. I fixed it already in my branch but forgot to format the
patch again... I'll do another version.
Thanks,
Jyro
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-31 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-31 14:24 [PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create() Jyri Sarha
2017-01-31 15:46 ` Gabriel Krisman Bertazi
2017-01-31 17:01 ` Jyri Sarha
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.