mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 10:48:17 +07: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 |