[PATCH 1/5] staging: slicoss: Change return codes to -EYYY.

Kulikov Vasiliy segooon at gmail.com
Wed Jun 30 13:02:40 UTC 2010


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.



More information about the devel mailing list