From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Rasmus Andersen <rasmus@jaquet.dk>
Cc: Roman.Hodek@informatik.uni-erlangen.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] make drivers/scsi/atari_scsi.c check request_irq (240p3)
Date: Sun, 14 Jan 2001 16:29:11 -0500 [thread overview]
Message-ID: <3A621A27.685B985E@mandrakesoft.com> (raw)
In-Reply-To: <20010114195323.B602@jaquet.dk>
Rasmus Andersen wrote:
>
> Hi.
>
> The following patch makes drivers/scsi/atari_scsi.c check request_irq's
> return code. It applies cleanly against 240p3 and ac9.
>
> Comments?
>
> --- linux-ac9/drivers/scsi/atari_scsi.c~ Tue Nov 28 02:57:34 2000
> +++ linux-ac9/drivers/scsi/atari_scsi.c Sun Jan 14 19:28:00 2001
> @@ -690,19 +690,27 @@
> /* This int is actually "pseudo-slow", i.e. it acts like a slow
> * interrupt after having cleared the pending flag for the DMA
> * interrupt. */
> - request_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr, IRQ_TYPE_SLOW,
> - "SCSI NCR5380", scsi_tt_intr);
> + if (!request_irq(IRQ_TT_MFP_SCSI, scsi_tt_intr, IRQ_TYPE_SLOW,
> + "SCSI NCR5380", scsi_tt_intr)) {
> + printk(KERN_ERR "atari_scsi_detect: cannot allocate irq %d, aborting",IRQ_TT_MFP_SCSI);
> + atari_stram_free(atari_dma_buffer);
> + atari_dma_buffer = 0;
> + return 0;
> + }
request_irq returns zero on success, not on failure. Further, you need
to return the request_irq error value back to the caller, if possible.
Jeff
--
Jeff Garzik | "You see, in this world there's two kinds of
Building 1024 | people, my friend: Those with loaded guns
MandrakeSoft | and those who dig. You dig." --Blondie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-14 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-14 18:53 [PATCH] make drivers/scsi/atari_scsi.c check request_irq (240p3) Rasmus Andersen
2001-01-14 19:35 ` Rasmus Andersen
2001-01-14 21:29 ` Jeff Garzik [this message]
2001-01-14 21:45 ` Rasmus Andersen
2001-01-16 20:57 ` Rasmus Andersen
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=3A621A27.685B985E@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=Roman.Hodek@informatik.uni-erlangen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rasmus@jaquet.dk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.