Commit 79d5eedd authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent a5581ef4
...@@ -182,7 +182,7 @@ static inline void *pcan_usb_fd_cmd_buffer(struct peak_usb_device *dev) ...@@ -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) static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail)
{ {
void *cmd_head = pcan_usb_fd_cmd_buffer(dev); void *cmd_head = pcan_usb_fd_cmd_buffer(dev);
int err; int err = 0;
u8 *packet_ptr; u8 *packet_ptr;
int i, n = 1, packet_len; int i, n = 1, packet_len;
ptrdiff_t cmd_len; ptrdiff_t cmd_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment