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

Thomas Zimmermann tzimmermann at suse.de
Thu Jun 27 07:57:55 UTC 2019


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 at suse.de>

Am 14.06.19 um 16:39 schrieb Colin King:
> From: Colin Ian King <colin.king at canonical.com>
> 
> 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 at canonical.com>
> ---
>  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)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190627/25a09084/attachment.sig>


More information about the dri-devel mailing list