PM / devfreq: memlat: Remove kfree() on probe fails
Memory allocated with devm_kzalloc() is automatically freed if
the probe function fails and returns an error code. So there
is no need to free cpu_grp explicitly for the failure cases
that might come up after it is allocated. Additionally calls to
devm_kzalloc() must be accompanied by devm_kfree() if memory
deallocation is necessary.
For these reasons remove the kfree(cpu_grp) from the probe
function.
Change-Id: Ic4838fd58d40d283ac301facc64b06813eb3bd7d
Signed-off-by:
Rohit Gupta <rohgup@codeaurora.org>
Loading
Please register or sign in to comment