summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorzhong jiang2018-09-21 15:18:43 +0200
committerMyungJoo Ham2018-10-02 03:16:41 +0200
commit8188b154f95014dae4d19892fefb202c8df3f885 (patch)
tree55c96d8c5b4017b62a4102de010039406411b969 /drivers/devfreq
parentPM / devfreq: stopping the governor before device_unregister() (diff)
downloadkernel-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.c3
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);
}