From: Marc Kleine-Budde Date: Wed, 1 Apr 2015 09:49:59 +0000 (+0200) Subject: can: pcan_usb: pcan_usb_fd_send_cmd(): silence compiler warning about uninitialized var X-Git-Tag: firefly_0821_release~176^2~1974^2~96^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=79d5eeddd7d23bd4588e370072977928b7075911;p=firefly-linux-kernel-4.4.55.git can: pcan_usb: pcan_usb_fd_send_cmd(): silence compiler warning about uninitialized var This patch silences the compiler warning: drivers/net/can/usb/peak_usb/pcan_usb_fd.c: In function 'pcan_usb_fd_send_cmd': drivers/net/can/usb/peak_usb/pcan_usb_fd.c:185:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized] by initialising the variable as 0. Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c index 0bac0f14edc3..00481eeb9924 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -182,7 +182,7 @@ static inline void *pcan_usb_fd_cmd_buffer(struct peak_usb_device *dev) static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail) { void *cmd_head = pcan_usb_fd_cmd_buffer(dev); - int err; + int err = 0; u8 *packet_ptr; int i, n = 1, packet_len; ptrdiff_t cmd_len;