]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: peak_usb: fix memset() usage
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 28 Nov 2014 13:08:48 +0000 (14:08 +0100)
committerJiri Slaby <jslaby@suse.cz>
Wed, 14 Jan 2015 13:42:52 +0000 (14:42 +0100)
commit6b4be54359e16d4b4f2dfa8d00ddce49e0e2d93b
tree9f328eb22c9a64d15378f76e5d356d4e6d65edd0
parente1f20f1d2fa56de8dfff0d7fcfe26609fa55cae6
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: Jiri Slaby <jslaby@suse.cz>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c