[SCSI] mpt fusion: Don't oops if NumPhys==0 Don't oops if NumPhys==0, instead return -ENODEV. This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=9909 Signed-off-by: Krzysztof Piotr Oledzki diff -Nur a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c --- a/drivers/message/fusion/mptsas.c 2007-10-09 22:31:38.000000000 +0200 +++ b/drivers/message/fusion/mptsas.c 2008-02-10 17:38:51.000000000 +0100 @@ -1772,6 +1772,11 @@ if (error) goto out_free_consistent; + if (!buffer->NumPhys) { + error = -ENODEV; + goto out_free_consistent; + } + /* save config data */ port_info->num_phys = buffer->NumPhys; port_info->phy_info = kcalloc(port_info->num_phys,