Re: [PATCH][next] drm/mgag200: add in missing { } around if block

From: Thomas Zimmermann
Date: Thu Jun 27 2019 - 03:58:01 EST


The code still used to work because mgag200 and userspace switch to a
software cursor if the HW cursor is not available. Thank you for fixing
this bug.

Acked-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

Am 14.06.19 um 16:39 schrieb Colin King:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> There is an if block that is missing the { } curly brackets. Add
> these in.
>
> Addresses-Coverity: ("Structurally dead code")
> Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/mgag200/mgag200_cursor.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mgag200/mgag200_cursor.c b/drivers/gpu/drm/mgag200/mgag200_cursor.c
> index f0c61a92351c..117eaedec7aa 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
> @@ -99,10 +99,11 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
>
> /* Pin and map up-coming buffer to write colour indices */
> ret = drm_gem_vram_pin(pixels_next, 0);
> - if (ret)
> + if (ret) {
> dev_err(&dev->pdev->dev,
> "failed to pin cursor buffer: %d\n", ret);
> goto err_drm_gem_vram_kunmap_src;
> + }
> dst = drm_gem_vram_kmap(pixels_next, true, NULL);
> if (IS_ERR(dst)) {
> ret = PTR_ERR(dst);
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix ImendÃrffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG NÃrnberg)

Attachment: signature.asc
Description: OpenPGP digital signature