Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

zhong jiang and committed by
MyungJoo Ham
8188b154 2f061fd0

+1 -2
+1 -2
drivers/devfreq/devfreq.c
··· 713 713 devfreq_remove_device(devfreq); 714 714 devfreq = NULL; 715 715 err_dev: 716 - if (devfreq) 717 - kfree(devfreq); 716 + kfree(devfreq); 718 717 err_out: 719 718 return ERR_PTR(err); 720 719 }