summaryrefslogtreecommitdiff
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-21 21:18:43 +0800
committerMyungJoo Ham <myungjoo.ham@samsung.com>2018-10-02 10:16:41 +0900
commit8188b154f95014dae4d19892fefb202c8df3f885 (patch)
tree55c96d8c5b4017b62a4102de010039406411b969 /drivers/devfreq
parent2f061fd0c2d852e32e03a903fccd810663c5c31e (diff)
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);
}