From: David Miller <davem@davemloft.net>
To: prarit@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH]: niu: fix uninitialized variable warning
Date: Thu, 27 May 2010 16:23:42 -0700 (PDT) [thread overview]
Message-ID: <20100527.162342.183041034.davem@davemloft.net> (raw)
In-Reply-To: <20100527183100.24251.12228.sendpatchset@prarit.bos.redhat.com>
From: Prarit Bhargava <prarit@redhat.com>
Date: Thu, 27 May 2010 14:35:03 -0400
> Fixes warning:
>
> drivers/net/niu.c: In function ‘niu_process_rx_pkt’:
> drivers/net/niu.c:3457: error: ‘link’ may be used uninitialized in this function
>
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
These blind uninitialized_var() annotations are almost always the wrong
thing to do. And that is the case here.
The code that looks up the page here can return NULL if there is some
error and the page hashes aren't setup properly, and then the callers
go and blindly assume that 'page' is non-NULL without any error
checking.
Applying this patch does more harm than good because it hides this
issue. So I'm definitely not applying this patch.
prev parent reply other threads:[~2010-05-27 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 18:35 [PATCH]: niu: fix uninitialized variable warning Prarit Bhargava
2010-05-27 23:23 ` David Miller [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=20100527.162342.183041034.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=prarit@redhat.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).