Commit 8188b154 authored by zhong jiang's avatar zhong jiang Committed by MyungJoo Ham

PM / devfreq: remove redundant null pointer check before kfree

kfree has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree.
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
parent 2f061fd0
......@@ -713,8 +713,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq_remove_device(devfreq);
devfreq = NULL;
err_dev:
if (devfreq)
kfree(devfreq);
kfree(devfreq);
err_out:
return ERR_PTR(err);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment