rmnet_core: Check if port is valid before tx
Add check to ensure that rmnet_port value returned by rmnet_get_port is not null before we go ahead and try to queue up an skb to be transmitted via it. Change-Id: I7890f4f2bcbb8dd300957c4fb12ec77f0412f4a6 Signed-off-by: Conner Huff <chuff@codeaurora.org>
This commit is contained in:
@@ -1641,6 +1641,10 @@ void rmnet_map_tx_qmap_cmd(struct sk_buff *qmap_skb, u8 ch, bool flush)
|
||||
ch = RMNET_DEFAULT_AGG_STATE;
|
||||
|
||||
port = rmnet_get_port(qmap_skb->dev);
|
||||
if (!port) {
|
||||
kfree_skb(qmap_skb);
|
||||
return;
|
||||
}
|
||||
state = &port->agg_state[ch];
|
||||
|
||||
if (!flush)
|
||||
|
Reference in New Issue
Block a user