diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-04-01 05:49:59 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-04-01 05:49:59 -0400 |
commit | 79d5eeddd7d23bd4588e370072977928b7075911 (patch) | |
tree | 8192ec5ba334cd49e5d418c665568db85bd78e65 /drivers/net/can | |
parent | a5581ef4c2eac6449188862e903eb46c7233582a (diff) |
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 <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
182 | static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail) | 182 | static int pcan_usb_fd_send_cmd(struct peak_usb_device *dev, void *cmd_tail) |
183 | { | 183 | { |
184 | void *cmd_head = pcan_usb_fd_cmd_buffer(dev); | 184 | void *cmd_head = pcan_usb_fd_cmd_buffer(dev); |
185 | int err; | 185 | int err = 0; |
186 | u8 *packet_ptr; | 186 | u8 *packet_ptr; |
187 | int i, n = 1, packet_len; | 187 | int i, n = 1, packet_len; |
188 | ptrdiff_t cmd_len; | 188 | ptrdiff_t cmd_len; |