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,7 +713,6 @@ struct devfreq *devfreq_add_device(struct device *dev, ...@@ -713,7 +713,6 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq_remove_device(devfreq); devfreq_remove_device(devfreq);
devfreq = NULL; devfreq = NULL;
err_dev: err_dev:
if (devfreq)
kfree(devfreq); kfree(devfreq);
err_out: err_out:
return ERR_PTR(err); 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