mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08: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 |