can: kvaser_usb: fix return value for hif_usb_send_regout

[ Upstream commit 0d34d8163fd87978a6abd792e2d8ad849f4c3d57 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Chen Ni 2024-05-21 12:10:20 +08:00 committed by Greg Kroah-Hartman
parent 528466f921
commit e4fca9acc7
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd,
}
usb_free_urb(urb);
return 0;
return err;
}
int kvaser_usb_can_rx_over_error(struct net_device *netdev)