aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorPan Bian <[email protected]>2017-11-12 15:52:02 +0000
committerSebastian Reichel <[email protected]>2017-11-13 10:56:12 +0000
commit838c8afa67f98014970c9f56107805e767ed87ad (patch)
tree60faf31c3ca8e32304d500efbe2ba975a693746f /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentpower: supply: replace pr_* with dev_* (diff)
downloadkernel-838c8afa67f98014970c9f56107805e767ed87ad.tar.gz
kernel-838c8afa67f98014970c9f56107805e767ed87ad.zip
power: supply: cpcap-charger: fix incorrect return value check
Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_usb_init_irq(), positive IRQ numbers are also taken as error cases. Use "if (irq < 0)" instead of "if (!irq)" to validate the return value of platform_get_irq_byname(). Signed-off-by: Pan Bian <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions