public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, linux-scsi@vger.kernel.org
Subject: [PATCH] m68k: scsi - kill warn_unused_result warnings
Date: Fri,  2 Jan 2009 11:41:24 +0100	[thread overview]
Message-ID: <1230892892-25751-12-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1230892892-25751-11-git-send-email-geert@linux-m68k.org>

warning: ignoring return value of 'request_irq', declared with attribute
warn_unused_result

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-scsi@vger.kernel.org
---
 drivers/scsi/a2091.c |   18 ++++++++++++------
 drivers/scsi/gvp11.c |    8 ++++++--
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 07d572f..37dd471 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -169,10 +169,8 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
 	    continue;
 
 	instance = scsi_register (tpnt, sizeof (struct WD33C93_hostdata));
-	if (instance == NULL) {
-	    release_mem_region(address, 256);
-	    continue;
-	}
+	if (instance == NULL)
+	    goto release;
 	instance->base = ZTWO_VADDR(address);
 	instance->irq = IRQ_AMIGA_PORTS;
 	instance->unique_id = z->slotaddr;
@@ -183,10 +181,18 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
 	HDATA(instance)->fast = 0;
 	HDATA(instance)->dma_mode = CTRL_DMA;
 	wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
-	request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
-		    instance);
+	if (request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
+			instance))
+	    goto unregister;
 	DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN;
 	num_a2091++;
+	continue;
+
+unregister:
+	scsi_unregister(instance);
+	wd33c93_release();
+release:
+	release_mem_region(address, 256);
     }
 
     return num_a2091;
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index ca73637..5d1bf7e 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -329,12 +329,16 @@ int __init gvp11_detect(struct scsi_host_template *tpnt)
 		     (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10
 					     : WD33C93_FS_12_15);
 
-	request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI",
-		    instance);
+	if (request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI",
+			instance))
+		goto unregister;
 	DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE;
 	num_gvp11++;
 	continue;
 
+unregister:
+	scsi_unregister(instance);
+	wd33c93_release();
 release:
 	release_mem_region(address, 256);
     }
-- 
1.5.6.5


  reply	other threads:[~2009-01-02 10:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-02 10:41 [PATCH] m68k: Atari SCC support for ST Geert Uytterhoeven
2009-01-02 10:41 ` [PATCH] m68k: amiga core - kill warn_unused_result warnings Geert Uytterhoeven
2009-01-02 10:41   ` [PATCH] m68k: apollo " Geert Uytterhoeven
2009-01-02 10:41     ` [PATCH] m68k: atari " Geert Uytterhoeven
2009-01-02 10:41       ` [PATCH] m68k: hp300 " Geert Uytterhoeven
2009-01-02 10:41         ` [PATCH] m68k: mac " Geert Uytterhoeven
2009-01-02 10:41           ` [PATCH] m68k: mvme147 " Geert Uytterhoeven
2009-01-02 10:41             ` [PATCH] m68k: sun3 " Geert Uytterhoeven
2009-01-02 10:41               ` [PATCH] m68k: atari_scc " Geert Uytterhoeven
2009-01-02 10:41                 ` [PATCH] m68k: vme_scc " Geert Uytterhoeven
2009-01-02 10:41                   ` [PATCH] m68k: ser_a2232 " Geert Uytterhoeven
2009-01-02 10:41                     ` Geert Uytterhoeven [this message]
2009-01-02 10:41                       ` [PATCH] m68k: atafb " Geert Uytterhoeven
2009-01-02 10:41                         ` [PATCH] m68k: amiserial " Geert Uytterhoeven
2009-01-02 10:41                           ` [PATCH] m68k: dio " Geert Uytterhoeven
2009-01-02 10:41                             ` [PATCH] m68k: zorro " Geert Uytterhoeven
2009-01-02 10:41                               ` [PATCH] m68k: dio - kill resource_size_t format warnings Geert Uytterhoeven
2009-01-02 10:41                                 ` [PATCH] m68k: zorro - use %pR to print resources Geert Uytterhoeven
2009-01-02 10:41                                   ` [PATCH] m68k: dmasound - kill warn_unused_result warnings Geert Uytterhoeven
2009-01-02 10:41                                     ` [PATCH] m68k: atari_scc - kill fake config variables Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1230892892-25751-12-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox