Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3e56c0a authored by Dan Carpenter's avatar Dan Carpenter Committed by Inaky Perez-Gonzalez
Browse files

wimax: checking ERR_PTR vs null



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: default avatarDan Carpenter <error27@gmail.com>
parent 7ef9f9a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -315,7 +315,7 @@ void __wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
		BUG();
		BUG();
	}
	}
	__wimax_state_set(wimax_dev, new_state);
	__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);
		wimax_gnl_re_state_change_send(wimax_dev, stch_skb, header);
out:
out:
	d_fnend(3, dev, "(wimax_dev %p new_state %u [old %u]) = void\n",
	d_fnend(3, dev, "(wimax_dev %p new_state %u [old %u]) = void\n",