Skip to content

Commit

Permalink
wimax: checking ERR_PTR vs null
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Inaky Perez-Gonzalez committed May 11, 2010
1 parent 7ef9f9a commit d3e56c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wimax/stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d3e56c0

Please sign in to comment.