projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f061fd
)
PM / devfreq: remove redundant null pointer check before kfree
author
zhong jiang
<zhongjiang@huawei.com>
Fri, 21 Sep 2018 13:18:43 +0000
(21:18 +0800)
committer
MyungJoo Ham
<myungjoo.ham@samsung.com>
Tue, 2 Oct 2018 01:16:41 +0000
(10:16 +0900)
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>
drivers/devfreq/devfreq.c
patch
|
blob
|
history
diff --git
a/drivers/devfreq/devfreq.c
b/drivers/devfreq/devfreq.c
index
1868423
..
1414130
100644
(file)
--- 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);
}