* [PATCH] drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()'
@ 2018-10-16 6:58 Christophe JAILLET
2018-10-16 10:07 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2018-10-16 6:58 UTC (permalink / raw)
To: laurent.pinchart, airlied
Cc: dri-devel, linux-renesas-soc, linux-kernel, kernel-janitors,
Christophe JAILLET
We return 0 unconditionally in 'rcar_du_crtc_set_crc_source()'.
However, 'ret' is set to some error codes if some function calls fail.
Return 'ret' instead to propagate the error code.
Fixes: 47a52d024e89 ("media: drm: rcar-du: Add support for CRC computation")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index 8a9e5e6f16b4..6eb0a95ad5a6 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -940,7 +940,7 @@ static int rcar_du_crtc_set_crc_source(struct drm_crtc *crtc,
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
- return 0;
+ return ret;
}
static const struct drm_crtc_funcs crtc_funcs_gen2 = {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()'
2018-10-16 6:58 [PATCH] drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()' Christophe JAILLET
@ 2018-10-16 10:07 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2018-10-16 10:07 UTC (permalink / raw)
To: Christophe JAILLET
Cc: airlied, dri-devel, linux-renesas-soc, linux-kernel, kernel-janitors
Hi Christophe,
Thank you for the patch.
On Tuesday, 16 October 2018 09:58:25 EEST Christophe JAILLET wrote:
> We return 0 unconditionally in 'rcar_du_crtc_set_crc_source()'.
> However, 'ret' is set to some error codes if some function calls fail.
>
> Return 'ret' instead to propagate the error code.
>
> Fixes: 47a52d024e89 ("media: drm: rcar-du: Add support for CRC computation")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and applied to my tree.
> ---
> drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c index 8a9e5e6f16b4..6eb0a95ad5a6
> 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -940,7 +940,7 @@ static int rcar_du_crtc_set_crc_source(struct drm_crtc
> *crtc, drm_modeset_drop_locks(&ctx);
> drm_modeset_acquire_fini(&ctx);
>
> - return 0;
> + return ret;
> }
>
> static const struct drm_crtc_funcs crtc_funcs_gen2 = {
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 6:58 [PATCH] drm: rcar-du: Fix the return value in case of error in 'rcar_du_crtc_set_crc_source()' Christophe JAILLET
2018-10-16 10:07 ` Laurent Pinchart
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).