s390/ipl: cast to SCSIDevice directly
commit216bdd274ae6111102d5f35a4fc6a580e4bc913d
authorCornelia Huck <cohuck@redhat.com>
Thu, 2 May 2019 15:46:51 +0000 (2 17:46 +0200)
committerCornelia Huck <cohuck@redhat.com>
Fri, 17 May 2019 05:57:46 +0000 (17 07:57 +0200)
treeefb97d7762455ef550a5f63d99d93f72c4566835
parentd8276573da58e8ce78dab8c46dd660efd664bcb7
s390/ipl: cast to SCSIDevice directly

Coverity notes that the result of object_dynamic_cast() to
SCSIDevice is not checked in s390_gen_initial_iplp(); as
we know that we always have a SCSIDevice in that branch,
we can instead cast via SCSI_DEVICE directly.

Coverity: CID 1401098
Fixes: 44445d8668f4 ("s390 vfio-ccw: Add bootindex property and IPLB data")
Message-Id: <20190502155516.12415-1-cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/ipl.c