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

Commit 8d716c7a authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 1faabf2a 76719868
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}