Re: [PATCH] Input: introduce managed input devices (add devres support)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > Either way, the code looks functional to me.
> 
> So is that "reviewed-by"?

I was thinking about this hunk:

> @@ -1972,7 +2084,20 @@ int input_register_device(struct input_dev *dev)
> 
>         mutex_unlock(&input_mutex);
> 
> +       if (dev->devres_managed) {
> +               dev_info(dev->dev.parent, "%s: registerign %s with devres.\n",
> +                       __func__, dev->name ?: "N/A");
> +               devres_add(dev->dev.parent, devres);
> +       }
>         return 0;
> +                                     
> +err_device_del:
> +       device_del(&dev->dev);
> +err_free_vals:
> +       kfree(dev->vals);

Won't this yield a double free once we reach release()?

> +err_devres_free:
> +       devres_free(devres);
>  +       return error;
>  }
>  EXPORT_SYMBOL(input_register_device);

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux