mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 03:30:08 -04:00
Merge tag 'linux-can-fixes-for-7.0-20260310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says: ==================== pull-request: can 2026-03-10 this is a pull request of 2 patches for net/main. Haibo Chen's patch fixes the maximum allowed bit rate error, which was broken in v6.19. Wenyuan Li contributes a patch for the hi311x driver that adds missing error checking in the caller of the hi3110_power_enable() function, hi3110_open(). linux-can-fixes-for-7.0-20260310 * tag 'linux-can-fixes-for-7.0-20260310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: hi311x: hi3110_open(): add check for hi3110_power_enable() return value can: dev: keep the max bitrate error at 5% ==================== Link: https://patch.msgid.link/20260310103547.2299403-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include <linux/units.h>
|
||||
#include <linux/can/dev.h>
|
||||
|
||||
#define CAN_CALC_MAX_ERROR 50 /* in one-tenth of a percent */
|
||||
#define CAN_CALC_MAX_ERROR 500 /* max error 5% */
|
||||
|
||||
/* CiA recommended sample points for Non Return to Zero encoding. */
|
||||
static int can_calc_sample_point_nrz(const struct can_bittiming *bt)
|
||||
|
||||
@@ -755,7 +755,9 @@ static int hi3110_open(struct net_device *net)
|
||||
return ret;
|
||||
|
||||
mutex_lock(&priv->hi3110_lock);
|
||||
hi3110_power_enable(priv->transceiver, 1);
|
||||
ret = hi3110_power_enable(priv->transceiver, 1);
|
||||
if (ret)
|
||||
goto out_close_candev;
|
||||
|
||||
priv->force_quit = 0;
|
||||
priv->tx_skb = NULL;
|
||||
@@ -790,6 +792,7 @@ static int hi3110_open(struct net_device *net)
|
||||
hi3110_hw_sleep(spi);
|
||||
out_close:
|
||||
hi3110_power_enable(priv->transceiver, 0);
|
||||
out_close_candev:
|
||||
close_candev(net);
|
||||
mutex_unlock(&priv->hi3110_lock);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user