netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] wimax: checking ERR_PTR vs null
@ 2010-04-22  9:50 Dan Carpenter
  2010-04-22 22:56 ` Inaky Perez-Gonzalez
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-04-22  9:50 UTC (permalink / raw)
  To: netdev
  Cc: Inaky Perez-Gonzalez, Alexey Dobriyan, Paulius Zaleckas,
	David S. Miller, wimax, kernel-janitors

stch_skb is allocated with wimax_gnl_re_state_change_alloc().  That
function returns ERR_PTRs on failure and doesn't return NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/net/wimax/stack.c b/net/wimax/stack.c
index 1ed65db..62b1a66 100644
--- a/net/wimax/stack.c
+++ b/net/wimax/stack.c
@@ -315,7 +315,7 @@ void __wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
 		BUG();
 	}
 	__wimax_state_set(wimax_dev, new_state);
-	if (stch_skb)
+	if (!IS_ERR(stch_skb))
 		wimax_gnl_re_state_change_send(wimax_dev, stch_skb, header);
 out:
 	d_fnend(3, dev, "(wimax_dev %p new_state %u [old %u]) = void\n",

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-22 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22  9:50 [patch] wimax: checking ERR_PTR vs null Dan Carpenter
2010-04-22 22:56 ` Inaky Perez-Gonzalez

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).