Yang Yingliang
authored
If device_register() returns error, the 'dev' and name needs be freed. Add a release function, and then call put_device() in the error path, so the name is freed in kobject_cleanup() and to the 'dev' is freed in release function. Fixes: 2e4c77be ("m68k: dio - Kill warn_unused_result warnings") Fixes: 1fa5ae85 ("driver core: get rid of struct device's bus_id string array") Signed-off-by:Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20221109064036.1835346-1-yangyingliang@huawei.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Name | Last commit | Last update |
---|---|---|
.. | ||
Makefile | ||
dio-driver.c | ||
dio-sysfs.c | ||
dio.c |