stallion, proper fail return values do not return 0 in one case and return proper values in other 2.
Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]> --- commit d62c04c8fe3271ab2089f442e04ad522a158bf8f tree 31beaaee84ef718acc5401b3cb07a7f2e340f0fe parent e7488128b7b4f61c82b6e323067d221c9397c43b author Jiri Slaby <[EMAIL PROTECTED]> Mon, 04 Jun 2007 00:07:20 +0200 committer Jiri Slaby <[EMAIL PROTECTED]> 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; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/