From patchwork Thu Mar 10 16:21:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koyamangalath, Abhilash" X-Patchwork-Id: 625301 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2AGM08d025235 for ; Thu, 10 Mar 2011 16:22:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653Ab1CJQVi (ORCPT ); Thu, 10 Mar 2011 11:21:38 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:48904 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751788Ab1CJQVi (ORCPT ); Thu, 10 Mar 2011 11:21:38 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p2AGLUvX008658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 10 Mar 2011 10:21:33 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p2AGLR9T024345; Thu, 10 Mar 2011 21:51:28 +0530 (IST) From: Abhilash K V To: socketcan-core@lists.berlios.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: wg@grandegger.com, linux-omap@vger.kernel.org, Abhilash K V , Vaibhav Hiremath Subject: [PATCH] can : TI_HECC : Unintialized variables Date: Thu, 10 Mar 2011 21:51:27 +0530 Message-Id: <1299774087-8532-1-git-send-email-abhilash.kv@ti.com> X-Mailer: git-send-email 1.6.2.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Mar 2011 16:22:02 +0000 (UTC) diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 4d07f1e..73c6025 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c @@ -503,6 +503,7 @@ 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; if (cf->can_id & CAN_RTR_FLAG) /* Remote transmission request */ data |= HECC_CANMCF_RTR; data |= get_tx_head_prio(priv) << 8; @@ -923,6 +924,7 @@ static int ti_hecc_probe(struct platform_device *pdev) priv->can.do_get_state = ti_hecc_get_state; priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES; + spin_lock_init(&priv->mbx_lock); ndev->irq = irq->start; ndev->flags |= IFF_ECHO; platform_set_drvdata(pdev, ndev);