lkml.org 
[lkml]   [2010]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] staging: slicoss: Change return codes to -EYYY.
On Mon, Jun 28, 2010 at 14:12 +0400, Denis Kirjanov wrote:
> > diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
> > index bebf0fd..102d3ea 100644
> > --- a/drivers/staging/slicoss/slicoss.c
> > +++ b/drivers/staging/slicoss/slicoss.c
> > @@ -452,7 +452,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
> >
> >        status = slic_card_init(card, adapter);
> >
> > -       if (status != STATUS_SUCCESS) {
> > +       if (status != 0) {
> >                card->state = CARD_FAIL;
> >                adapter->state = ADAPT_FAIL;
> >                adapter->linkstate = LINK_DOWN;
>
> Can we really continue here?
>

It seems that we have to goto err_out_unmap, yes?

> > @@ -1206,7 +1206,7 @@ static void slic_link_event_handler(struct adapter *adapter)
> >  #else
> >        Stop compilation;
> >  #endif
> > -       ASSERT((status == STATUS_SUCCESS) || (status == STATUS_PENDING));
> > +       ASSERT(status == 0);
> >  }
> >
>
> Now that looks useless since slic_upr_request can return STATUS_PENDING
> or -ENOMEM. Same for slic_config_get


Anyway, this code is full of ASSERT()'s, grep see 71 calls to it.
It needs more considered patch than these cleanup patches.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-06-30 15:05    [from the cache]
©2003-2011 Jasper Spaans