Skip to content

Commit

Permalink
[NET] netconsole: Remove bogus check
Browse files Browse the repository at this point in the history
Based upon initial work by Keiichi Kii <k-keiichi@bx.jp.nec.com>.

The (!np.dev) check in write_msg() is bogus (always false), because: np.dev is
set by netpoll_setup(), which is called by init_netconsole() before
register_console(), so write_msg() cannot be triggered unless netpoll_setup()
successfully set np.dev.  Also np.dev cannot go away from under us, because
netpoll_setup() grabs us reference on it.  So let's remove the bogus check.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Acked-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Satyam Sharma authored and David S. Miller committed Oct 10, 2007
1 parent d39badf commit d133ccb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/net/netconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ static void write_msg(struct console *con, const char *msg, unsigned int len)
int frag, left;
unsigned long flags;

if (!np.dev)
return;

local_irq_save(flags);

for (left = len; left;) {
Expand Down

0 comments on commit d133ccb

Please sign in to comment.