From: Dan Carpenter <error27@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Stefano Brivio <stefano.brivio@polimi.it>,
kernel-janitors@vger.kernel.org,
"open list:B43 WIRELESS DRIVER" <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [patch] b43: check for allocation failures
Date: Thu, 9 Jun 2011 10:58:23 +0300 [thread overview]
Message-ID: <20110609075813.GG4069@shale.localdomain> (raw)
In-Reply-To: <BANLkTim3zJNJfGHcaeY+PQN3wm1m20Qzjw@mail.gmail.com>
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
prev parent reply other threads:[~2011-06-09 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 7:09 [patch] b43: check for allocation failures Dan Carpenter
[not found] ` <BANLkTim3zJNJfGHcaeY+PQN3wm1m20Qzjw@mail.gmail.com>
2011-06-09 7:58 ` Dan Carpenter [this message]
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=20110609075813.GG4069@shale.localdomain \
--to=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stefano.brivio@polimi.it \
--cc=zajec5@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).