Skip to content

Commit 6f288cc

Browse files
Abhilash K Vdavem330
authored andcommitted
can: ti_hecc: Fix unintialized variable
In ti_hecc_xmit(), local variable "data" is not initialized before being used. This initialization got inadvertently removed in the following patch: can: Unify droping of invalid tx skbs and netdev stats Acked-by: Anant Gole <anantgole@ti.com> Signed-off-by: Abhilash K V <abhilash.kv@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 69558ee commit 6f288cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/can/ti_hecc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
503503
spin_unlock_irqrestore(&priv->mbx_lock, flags);
504504

505505
/* Prepare mailbox for transmission */
506+
data = cf->can_dlc | (get_tx_head_prio(priv) << 8);
506507
if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */
507508
data |= HECC_CANMCF_RTR;
508-
data |= get_tx_head_prio(priv) << 8;
509509
hecc_write_mbx(priv, mbxno, HECC_CANMCF, data);
510510

511511
if (cf->can_id & CAN_EFF_FLAG) /* Extended frame format */

0 commit comments

Comments
 (0)