mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-26 13:29:39 +07:00
Merge branch 'fixes-for-3.11' of git://gitorious.org/linux-can/linux-can
Marc Kleine-Budde says: ==================== here are two fixes for the v3.11 release cycle: Maximilian Schneider contributes a patch for the esd_usb2 CAN driver. It adds sanity checking to the data coming from the USB CAN adapter before using it. Alexey Khoroshilov from the Linux Driver Verification project fixes an urb leak in the error handling of the USB 8dev's usb_8dev_start() function. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
8d716c7a09
@ -412,10 +412,20 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
|
||||
|
||||
switch (msg->msg.hdr.cmd) {
|
||||
case CMD_CAN_RX:
|
||||
if (msg->msg.rx.net >= dev->net_count) {
|
||||
dev_err(dev->udev->dev.parent, "format error\n");
|
||||
break;
|
||||
}
|
||||
|
||||
esd_usb2_rx_can_msg(dev->nets[msg->msg.rx.net], msg);
|
||||
break;
|
||||
|
||||
case CMD_CAN_TX:
|
||||
if (msg->msg.txdone.net >= dev->net_count) {
|
||||
dev_err(dev->udev->dev.parent, "format error\n");
|
||||
break;
|
||||
}
|
||||
|
||||
esd_usb2_tx_done_msg(dev->nets[msg->msg.txdone.net],
|
||||
msg);
|
||||
break;
|
||||
|
@ -779,6 +779,7 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)
|
||||
usb_unanchor_urb(urb);
|
||||
usb_free_coherent(priv->udev, RX_BUFFER_SIZE, buf,
|
||||
urb->transfer_dma);
|
||||
usb_free_urb(urb);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user