The null check on pHba->channel[chan].device is redundant because
device is an array and hence can never be null. Remove the check.
Detected by CoverityScan, CID#115362 ("Array compared against 0")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
if(chan < 0 || chan >= MAX_CHANNEL)
return NULL;
- if( pHba->channel[chan].device == NULL){
- printk(KERN_DEBUG"Adaptec I2O RAID: Trying to find device before they are allocated\n");
- return NULL;
- }
-
d = pHba->channel[chan].device[id];
if(!d || d->tid == 0) {
return NULL;