summaryrefslogtreecommitdiff
path: root/drivers/sfi/sfi_acpi.c
diff options
context:
space:
mode:
authorManfred Schlaegl <manfred.schlaegl@ginzinger.com>2018-12-19 19:39:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-31 08:15:43 +0100
commite0bb30468985cfe5783bfb57a9a1282515c8d37d (patch)
tree66a0db4cf29c506cc8e324c6176ed379b82baed9 /drivers/sfi/sfi_acpi.c
parent8e44876cfc7c0f1f959f57b96d880fe902c4c2db (diff)
can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by removing it
commit 7b12c8189a3dc50638e7d53714c88007268d47ef upstream. This patch revert commit 7da11ba5c506 ("can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb") After introduction of this change we encountered following new error message on various i.MX plattforms (flexcan): | flexcan 53fc8000.can can0: __can_get_echo_skb: BUG! Trying to echo non | existing skb: can_priv::echo_skb[0] The introduction of the message was a mistake because priv->echo_skb[idx] = NULL is a perfectly valid in following case: If CAN_RAW_LOOPBACK is disabled (setsockopt) in applications, the pkt_type of the tx skb's given to can_put_echo_skb is set to PACKET_LOOPBACK. In this case can_put_echo_skb will not set priv->echo_skb[idx]. It is therefore kept NULL. As additional argument for revert: The order of check and usage of idx was changed. idx is used to access an array element before checking it's boundaries. Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com> Fixes: 7da11ba5c506 ("can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb") Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/sfi/sfi_acpi.c')
0 files changed, 0 insertions, 0 deletions