summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/devfreq.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-21 15:18:43 +0200
committerMyungJoo Ham <myungjoo.ham@samsung.com>2018-10-02 03:16:41 +0200
commit8188b154f95014dae4d19892fefb202c8df3f885 (patch)
tree55c96d8c5b4017b62a4102de010039406411b969 /drivers/devfreq/devfreq.c
parentPM / devfreq: stopping the governor before device_unregister() (diff)
downloadlinux-8188b154f95014dae4d19892fefb202c8df3f885.tar.xz
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/devfreq.c')
-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);
}