|
@@ -338,6 +338,12 @@ void st_int_recv(void *disc_data,
|
|
|
/* Unknow packet? */
|
|
|
default:
|
|
|
type = *ptr;
|
|
|
+ if (st_gdata->list[type] == NULL) {
|
|
|
+ pr_err("chip/interface misbehavior dropping"
|
|
|
+ " frame starting with 0x%02x", type);
|
|
|
+ goto done;
|
|
|
+
|
|
|
+ }
|
|
|
st_gdata->rx_skb = alloc_skb(
|
|
|
st_gdata->list[type]->max_frame_size,
|
|
|
GFP_ATOMIC);
|
|
@@ -354,6 +360,7 @@ void st_int_recv(void *disc_data,
|
|
|
ptr++;
|
|
|
count--;
|
|
|
}
|
|
|
+done:
|
|
|
spin_unlock_irqrestore(&st_gdata->lock, flags);
|
|
|
pr_debug("done %s", __func__);
|
|
|
return;
|