mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 10:32:35 +00:00
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:
|
||
---|---|---|
.. | ||
base.c | ||
bus.c | ||
clock.c | ||
common.h | ||
driver.c | ||
Makefile | ||
perf.c | ||
power.c | ||
reset.c | ||
scmi_pm_domain.c | ||
sensors.c |