[PATCH] drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()
Gabriel Krisman Bertazi
krisman at collabora.co.uk
Tue Jan 31 15:46:28 UTC 2017
Jyri Sarha <jsarha at 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 at 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
More information about the dri-devel
mailing list