[PATCH v2 2/5] accel/thames: Add driver for the C7x DSPs in TI SoCs

Markus Elfring Markus.Elfring at web.de
Wed Jan 14 09:02:08 PST 2026


…
> +++ b/drivers/accel/thames/thames_drv.c
> @@ -0,0 +1,155 @@
…
> +static int thames_open(struct drm_device *dev, struct drm_file *file)
> +{
…
> +	if (!try_module_get(THIS_MODULE))
> +		return -EINVAL;
> +
> +	thames_priv = kzalloc(sizeof(*thames_priv), GFP_KERNEL);
> +	if (!thames_priv) {
> +		ret = -ENOMEM;
> +		goto err_put_mod;
> +	}
…

I find the identifiers “ret” and “err_put_mod” redundant here because the desired
exception handling can be specified in this if branch directly.

Regards,
Markus



More information about the linux-arm-kernel mailing list