Skip to content

Commit

Permalink
can: ti_hecc: Fix unintialized variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Abhilash K V authored and davem330 committed Aug 26, 2011
1 parent 69558ee commit 6f288cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/ti_hecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ static netdev_tx_t ti_hecc_xmit(struct sk_buff *skb, struct net_device *ndev)
spin_unlock_irqrestore(&priv->mbx_lock, flags);

/* Prepare mailbox for transmission */
data = cf->can_dlc | (get_tx_head_prio(priv) << 8);
if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */
data |= HECC_CANMCF_RTR;
data |= get_tx_head_prio(priv) << 8;
hecc_write_mbx(priv, mbxno, HECC_CANMCF, data);

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

0 comments on commit 6f288cc

Please sign in to comment.