diff options
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/dln2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mfd/dln2.c b/drivers/mfd/dln2.c index cf22841c1e3c..df2fda9cd3db 100644 --- a/drivers/mfd/dln2.c +++ b/drivers/mfd/dln2.c @@ -195,6 +195,9 @@ static bool dln2_transfer_complete(struct dln2_dev *dln2, struct urb *urb, struct dln2_rx_context *rxc; bool valid_slot = false; + if (rx_slot >= DLN2_MAX_RX_SLOTS) + goto out; + rxc = &rxs->slots[rx_slot]; /* @@ -210,6 +213,7 @@ static bool dln2_transfer_complete(struct dln2_dev *dln2, struct urb *urb, } spin_unlock(&rxs->lock); +out: if (!valid_slot) dev_warn(dev, "bad/late response %d/%d\n", handle, rx_slot); |