Re: [PATCH] nvme/hwmon: Return error code when registration fails

2021-02-24 Thread Christoph Hellwig
Thanks, applied to nvme-5.12.

Re: [PATCH] nvme/hwmon: Return error code when registration fails

2021-02-12 Thread Hannes Reinecke
On 2/12/21 10:30 AM, Daniel Wagner wrote: The hwmon pointer wont be NULL if the registration fails. Though the exit code path will assign it to ctrl->hwmon_device. Later nvme_hwmon_exit() will try to free the invalid pointer. Avoid this by returning the error code from

[PATCH] nvme/hwmon: Return error code when registration fails

2021-02-12 Thread Daniel Wagner
The hwmon pointer wont be NULL if the registration fails. Though the exit code path will assign it to ctrl->hwmon_device. Later nvme_hwmon_exit() will try to free the invalid pointer. Avoid this by returning the error code from hwmon_device_register_with_info(). Fixes: ec420cdcfab4 ("nvme/hwmon: