sata_rcar: fix deferred probing
[sfrench/cifs-2.6.git] / drivers / ata / sata_rcar.c
index 10ecb232245db8c617ee808966db432ece834358..59b2317acea99e46b282bd637f7281d716bf0b95 100644 (file)
@@ -1,14 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Renesas R-Car SATA driver
  *
  * Author: Vladimir Barinov <source@cogentembedded.com>
  * Copyright (C) 2013-2015 Cogent Embedded, Inc.
  * Copyright (C) 2013-2015 Renesas Solutions Corp.
- *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
  */
 
 #include <linux/kernel.h>
@@ -895,7 +891,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
        int ret = 0;
 
        irq = platform_get_irq(pdev, 0);
-       if (irq <= 0)
+       if (irq < 0)
+               return irq;
+       if (!irq)
                return -EINVAL;
 
        priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);