From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] Char: stallion, proper fail return values
Date: Tue, 5 Jun 2007 23:22:19 +0200 (CEST) [thread overview]
Message-ID: <15021191752898126212@wsc.cz> (raw)
In-Reply-To: <1058130869771517818@wsc.cz>
stallion, proper fail return values
do not return 0 in one case and return proper values in other 2.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit d62c04c8fe3271ab2089f442e04ad522a158bf8f
tree 31beaaee84ef718acc5401b3cb07a7f2e340f0fe
parent e7488128b7b4f61c82b6e323067d221c9397c43b
author Jiri Slaby <jirislaby@gmail.com> Mon, 04 Jun 2007 00:07:20 +0200
committer Jiri Slaby <jirislaby@gmail.com> Tue, 05 Jun 2007 23:14:45 +0200
drivers/char/stallion.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 23ea4c8..45bf2a2 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -2177,6 +2177,7 @@ static int __devinit stl_initech(struct stlbrd *brdp)
if (!panelp) {
printk("STALLION: failed to allocate memory "
"(size=%Zd)\n", sizeof(struct stlpanel));
+ retval = -ENOMEM;
goto err_fr;
}
panelp->magic = STL_PANELMAGIC;
@@ -2223,8 +2224,10 @@ static int __devinit stl_initech(struct stlbrd *brdp)
brdp->nrports += panelp->nrports;
brdp->panels[panelnr++] = panelp;
if ((brdp->brdtype != BRD_ECHPCI) &&
- (ioaddr >= (brdp->ioaddr2 + brdp->iosize2)))
+ (ioaddr >= (brdp->ioaddr2 + brdp->iosize2))) {
+ retval = -EINVAL;
goto err_fr;
+ }
}
brdp->nrpanels = panelnr;
@@ -2371,6 +2374,7 @@ static int __devinit stl_pciprobe(struct pci_dev *pdev,
dev_err(&pdev->dev, "too many boards found, "
"maximum supported %d\n", STL_MAXBRDS);
mutex_unlock(&stl_brdslock);
+ retval = -ENODEV;
goto err_fr;
}
brdp->brdnr = (unsigned int)brdnr;
next prev parent reply other threads:[~2007-06-05 21:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 21:20 [PATCH 1/3] Char: stallion, don't fail with less than max panels Jiri Slaby
2007-06-05 21:21 ` [PATCH 2/3] Char: stallion, alloc tty before pci devices init Jiri Slaby
2007-06-05 21:22 ` Jiri Slaby [this message]
2007-06-05 21:27 ` [PATCH 4/3] Char: stallion, remove user class report request Jiri Slaby
2007-06-06 0:17 ` [PATCH 1/3] Char: stallion, don't fail with less than max panels Andrew Morton
2007-06-06 7:00 ` Jiri Slaby
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=15021191752898126212@wsc.cz \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@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 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.