kernel_optimize_test/arch/s390
Niklas Schnelle 075e303474 s390/pci: remove superfluous zdev->zbus check
commit e1bff843cde62a45a287b7f9b4cd5e824e8e49e2 upstream.

Checking zdev->zbus for NULL in __zpci_event_availability() is
superfluous as it can never be NULL at this point. While harmless this
check causes smatch warnings because we later access zdev->zbus with
only having checked zdev != NULL which is sufficient.

The reason zdev->zbus can never be NULL is since with zdev != NULL given
we know the zdev came from get_zdev_by_fid() and thus the zpci_list.
Now on first glance at zpci_create_device() one may assume that there is
a window where the zdev is in the list without a zdev, however this
window can't overlap with __zpci_event_availability() as
zpci_create_device() either runs on the same kthread as part of
availability events, or during the initial CLP List PCI at which point
the __zpci_event_availability() is not yet called as zPCI is not yet
initialized.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-25 09:04:05 +01:00
..
appldata
boot s390: uv: Fix sysfs max number of VCPUs reporting 2021-02-03 23:28:39 +01:00
configs
crypto
hypfs
include s390/pci: refactor zpci_create_device() 2021-03-25 09:04:05 +01:00
kernel s390/vtime: fix increased steal time accounting 2021-03-25 09:04:05 +01:00
kvm
lib
mm
net
oprofile
pci s390/pci: remove superfluous zdev->zbus check 2021-03-25 09:04:05 +01:00
purgatory s390/kexec_file: fix diag308 subcode when loading crash kernel 2020-12-30 11:54:08 +01:00
tools
Kbuild
Kconfig
Kconfig.debug
Makefile