Search Linux Wireless

Re: [patch] b43: check for allocation failures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 09, 2011 at 09:43:44AM +0200, RafaÅ MiÅecki wrote:
> >        dev = b43_bus_dev_ssb_init(sdev);
> > +       if (!dev)
> > +               return -ENOMEM;
> 
> I'm not sure if you should be aware of the reason here. What about returning
> error code by b43_bus_dev..., reporting it here with b43err and returning
> ENODEV or sth?

The kmalloc failure prints out a whole lot of crap.  Surely we don't
need to add more code in every function for an error that is almost
certainly not going to happen in real life.

If we were really worried about returning the right error code, then
we'd return an ERR_PTR() from the lower levels etc.  I don't think
it's worth it though.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux