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

macintosh/windfarm_pm91: Fix warning comparing pointer to 0

Avoid pointer type value compared with 0 to make code clear.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1647484953-15249-1-git-send-email-baihaowen@meizu.com

authored by

Haowen Bai and committed by
Michael Ellerman
88316944 2f59562c

+1 -1
+1 -1
drivers/macintosh/windfarm_pm91.c
··· 150 150 151 151 /* First, locate the PID params in SMU SBD */ 152 152 hdr = smu_get_sdb_partition(SMU_SDB_CPUPIDDATA_ID, NULL); 153 - if (hdr == 0) { 153 + if (!hdr) { 154 154 printk(KERN_WARNING "windfarm: CPU PID fan config not found " 155 155 "max fan speed\n"); 156 156 goto fail;