[BUG] scsi: vmw_pvscsi: got a warning when failing at probe

From: Zheyu Ma
Date: Sat May 21 2022 - 10:05:05 EST


Hello,

I found a bug in the vmw_pvscsi driver.
When the driver fails to allocate the host, I get the following warning:

[ 22.759652] VMware PVSCSI driver - version 1.0.7.0-k
[ 22.766883] vmw_pvscsi: using 64bit dma
[ 22.767357] vmw_pvscsi 0000:00:05.0: vmw_pvscsi: PVSCSI_CMD_CONFIG
failed. hostStatus = 0x1a, scsiStatus = 0x2
[ 22.767859] vmw_pvscsi: max_id: 16
[ 22.768029] vmw_pvscsi: setting ring_pages to 8
[ 22.768263] vmw_pvscsi: failed to allocate host
[ 22.768491] ------------[ cut here ]------------
[ 22.768767] Trying to free already-free IRQ 21
[ 22.769001] WARNING: CPU: 0 PID: 336 at kernel/irq/manage.c:1861
free_irq+0x3a4/0x7c0
[ 22.771363] RIP: 0010:free_irq+0x3a4/0x7c0
[ 22.775533] Call Trace:
[ 22.775662] <TASK>
[ 22.775780] pvscsi_shutdown_intr+0x50/0x70 [vmw_pvscsi]
[ 22.776053] pvscsi_probe+0x2b3/0xe50 [vmw_pvscsi]

The driver's error handling code should be refined.

Zheyu Ma