can: peak_usb: fix memset() usage
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 28 Nov 2014 13:08:48 +0000 (14:08 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 6 Dec 2014 18:11:18 +0000 (19:11 +0100)
commitdc50ddcd4c58a5a0226038307d6ef884bec9f8c2
tree167b64ab65c8d20e118a2d6a11bc95ccd507c7cd
parentf2a01517f2a1040a0b156f171a7cefd748f2fd03
can: peak_usb: fix memset() usage

This patchs fixes a misplaced call to memset() that fills the request
buffer with 0. The problem was with sending PCAN_USBPRO_REQ_FCT
requests, the content set by the caller was thus lost.

With this patch, the memory area is zeroed only when requesting info
from the device.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c