Skip to content

Commit 0d34d81

Browse files
Chen Nimarckleinebudde
authored andcommitted
can: kvaser_usb: fix return value for hif_usb_send_regout
As the potential failure of usb_submit_urb(), it should be better to return the err variable to catch the error. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/all/20240521041020.1519416-1-nichen@iscas.ac.cn Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 9ad1da1 commit 0d34d81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd,
294294
}
295295
usb_free_urb(urb);
296296

297-
return 0;
297+
return err;
298298
}
299299

300300
int kvaser_usb_can_rx_over_error(struct net_device *netdev)

0 commit comments

Comments
 (0)