can: peak_usb: fix memset() usage
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 28 Nov 2014 13:08:48 +0000 (14:08 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:05:41 +0000 (13:05 +0000)
commitfd06c6a369506f12b0aae7218091f6b023df89d3
treedccb10f1e01af31e441d78130c80079ee1d23199
parent83908aed2fe310bb7f54283b53f32d278b1221a5
can: peak_usb: fix memset() usage

commit dc50ddcd4c58a5a0226038307d6ef884bec9f8c2 upstream.

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c