[PATCH 2/4] gpu: host1x: Add locking to syncpt

Thierry Reding thierry.reding at gmail.com
Fri Nov 11 14:33:03 UTC 2016


On Tue, Nov 08, 2016 at 07:51:33PM +0200, Mikko Perttunen wrote:
[...]
> @@ -86,7 +88,17 @@ static struct host1x_syncpt *host1x_syncpt_alloc(struct host1x *host,
>  	else
>  		sp->client_managed = false;
>  
> +	mutex_unlock(&host->syncpt_mutex);
>  	return sp;
> +
> +err_alloc_name:

It's better to use labels that describe what they do, rather than when
they get called.

> +	host1x_syncpt_base_free(sp->base);
> +	sp->base = NULL;
> +err_alloc_base:
> +	sp = NULL;

This is useless because the variable is no longer used after this and
goes out of scope.

I fixed up these two issues and applied.

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161111/9ae53c10/attachment.sig>


More information about the dri-devel mailing list