Explorar o código

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>
zhong jiang %!s(int64=6) %!d(string=hai) anos
pai
achega
8188b154f9
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      drivers/devfreq/devfreq.c

+ 1 - 2
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);
 }