8305e90a89
If device_register() fails, both put_device() and kfree() are called,
ending with a double free of the scmi_dev.
Calling kfree() is needed only when a failure happens between the
allocation of the scmi_dev and its registration, so move it to there
and remove it from the error flow.
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
base.c | ||
bus.c | ||
clock.c | ||
common.h | ||
driver.c | ||
perf.c | ||
power.c | ||
reset.c | ||
scmi_pm_domain.c | ||
sensors.c |