diff options
author | Matthew Rosato <mjrosato@linux.ibm.com> | 2022-09-15 20:55:14 +0300 |
---|---|---|
committer | Janosch Frank <frankja@linux.ibm.com> | 2022-09-21 17:18:30 +0300 |
commit | e8c924a4fb6ef9a224423fb5542954acbda234b3 (patch) | |
tree | 27afb5d6a8b1bbf36e588bff575698584bbbfbb6 /arch/s390/kvm/pci.h | |
parent | 521a547ced6477c54b4b0cc206000406c221b4d6 (diff) | |
download | linux-e8c924a4fb6ef9a224423fb5542954acbda234b3.tar.xz |
KVM: s390: pci: fix plain integer as NULL pointer warnings
Fix some sparse warnings that a plain integer 0 is being used instead of
NULL.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20220915175514.167899-1-mjrosato@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'arch/s390/kvm/pci.h')
-rw-r--r-- | arch/s390/kvm/pci.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kvm/pci.h b/arch/s390/kvm/pci.h index 3a3606c3a0fe..486d06ef563f 100644 --- a/arch/s390/kvm/pci.h +++ b/arch/s390/kvm/pci.h @@ -46,9 +46,9 @@ extern struct zpci_aift *aift; static inline struct kvm *kvm_s390_pci_si_to_kvm(struct zpci_aift *aift, unsigned long si) { - if (!IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM) || aift->kzdev == 0 || - aift->kzdev[si] == 0) - return 0; + if (!IS_ENABLED(CONFIG_VFIO_PCI_ZDEV_KVM) || !aift->kzdev || + !aift->kzdev[si]) + return NULL; return aift->kzdev[si]->kvm; }; |