diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-10-31 12:26:24 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-12-10 12:53:09 +0100 |
commit | cce2d7d2abcc8d083fbb24e795089542f1e742c8 (patch) | |
tree | c632a74c11515544588592bde220ba0627a06082 /drivers/net/can | |
parent | Merge tag 'ipsec-next-2022-12-09' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-cce2d7d2abcc8d083fbb24e795089542f1e742c8.tar.xz linux-cce2d7d2abcc8d083fbb24e795089542f1e742c8.zip |
can: kvaser_usb: kvaser_usb_set_bittiming(): fix redundant initialization warning for err
The variable err is initialized, but the initialized value is
Overwritten before it is read. Fix the warning by not initializing the
variable err at all.
Fixes: 39d3df6b0ea8 ("can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming")
Cc: Jimmy Assarsson <extja@kvaser.com>
Cc: Anssi Hannula <anssi.hannula@bitwise.fi>
Link: https://lore.kernel.org/all/20221031114513.81214-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c index 3a2bfaad1406..b17c4d8c6cf9 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c @@ -541,7 +541,7 @@ static int kvaser_usb_set_bittiming(struct net_device *netdev) int tseg1 = bt->prop_seg + bt->phase_seg1; int tseg2 = bt->phase_seg2; int sjw = bt->sjw; - int err = -EOPNOTSUPP; + int err; busparams.bitrate = cpu_to_le32(bt->bitrate); busparams.sjw = (u8)sjw; |