* [patch] wimax: checking ERR_PTR vs null
@ 2010-04-22 9:50 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* [patch] wimax: checking ERR_PTR vs null
@ 2010-04-22 9:50 ` Dan Carpenter
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* Re: [patch] wimax: checking ERR_PTR vs null
2010-04-22 9:50 ` Dan Carpenter
@ 2010-04-22 22:56 ` Inaky Perez-Gonzalez
-1 siblings, 0 replies; 4+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-04-22 22:56 UTC (permalink / raw)
To: Dan Carpenter
Cc: netdev@vger.kernel.org, wimax@linuxwimax.org,
kernel-janitors@vger.kernel.org, David S. Miller,
Paulius Zaleckas, Alexey Dobriyan
On Thu, 2010-04-22 at 02:50 -0700, Dan Carpenter wrote:
> 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>
ACK, thanks [and thanks to davem for reminding me]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] wimax: checking ERR_PTR vs null
@ 2010-04-22 22:56 ` Inaky Perez-Gonzalez
0 siblings, 0 replies; 4+ messages in thread
From: Inaky Perez-Gonzalez @ 2010-04-22 22:56 UTC (permalink / raw)
To: Dan Carpenter
Cc: netdev@vger.kernel.org, wimax@linuxwimax.org,
kernel-janitors@vger.kernel.org, David S. Miller,
Paulius Zaleckas, Alexey Dobriyan
On Thu, 2010-04-22 at 02:50 -0700, Dan Carpenter wrote:
> 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>
ACK, thanks [and thanks to davem for reminding me]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-22 23:00 UTC | newest]
Thread overview: 4+ 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 9:50 ` Dan Carpenter
2010-04-22 22:56 ` Inaky Perez-Gonzalez
2010-04-22 22:56 ` Inaky Perez-Gonzalez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.