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

From: Markus Elfring

Date: Wed Jan 14 2026 - 12:02:14 EST



> +++ 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