Merge tag 'hwlock-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson...
[linux-2.6-microblaze.git] / drivers / ata / sata_mv.c
index bd23d63..c8867c1 100644 (file)
@@ -4097,6 +4097,10 @@ static int mv_platform_probe(struct platform_device *pdev)
                n_ports = mv_platform_data->n_ports;
                irq = platform_get_irq(pdev, 0);
        }
+       if (irq < 0)
+               return irq;
+       if (!irq)
+               return -EINVAL;
 
        host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
        hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);