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