diff options
author | zhong jiang | 2018-09-21 15:18:43 +0200 |
---|---|---|
committer | MyungJoo Ham | 2018-10-02 03:16:41 +0200 |
commit | 8188b154f95014dae4d19892fefb202c8df3f885 (patch) | |
tree | 55c96d8c5b4017b62a4102de010039406411b969 /drivers/devfreq | |
parent | PM / devfreq: stopping the governor before device_unregister() (diff) | |
download | kernel-qcow2-linux-8188b154f95014dae4d19892fefb202c8df3f885.tar.gz kernel-qcow2-linux-8188b154f95014dae4d19892fefb202c8df3f885.tar.xz kernel-qcow2-linux-8188b154f95014dae4d19892fefb202c8df3f885.zip |
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: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/devfreq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 1868423355d9..141413067b5c 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -713,8 +713,7 @@ err_init: devfreq_remove_device(devfreq); devfreq = NULL; err_dev: - if (devfreq) - kfree(devfreq); + kfree(devfreq); err_out: return ERR_PTR(err); } |