can: peak_usb: fix memset() usage
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 28 Nov 2014 13:08:48 +0000 (14:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2015 14:59:00 +0000 (06:59 -0800)
commit413706774c9eec19a0484392a278bf3aafd11d3b
tree024b422ac578ab5846f24fa78cb38c107a8f280d
parent5e5740524c3c8c4127d6e0eab62c619f6650e017
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