From patchwork Fri Jun 29 11:05:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shubhrajyoti Datta X-Patchwork-Id: 1131501 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A78B9DFF34 for ; Fri, 29 Jun 2012 11:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256Ab2F2LF4 (ORCPT ); Fri, 29 Jun 2012 07:05:56 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:34549 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570Ab2F2LFz (ORCPT ); Fri, 29 Jun 2012 07:05:55 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q5TB5b50022211; Fri, 29 Jun 2012 06:05:37 -0500 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5TB5YNq009771; Fri, 29 Jun 2012 16:35:35 +0530 (IST) Received: from dbdp33.itg.ti.com (172.24.170.252) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Fri, 29 Jun 2012 16:35:35 +0530 Received: from ula0393217.india.ti.com (smtpvbd.itg.ti.com [172.24.170.250]) by dbdp33.itg.ti.com (8.13.8/8.13.8) with ESMTP id q5TB5VHQ001275; Fri, 29 Jun 2012 16:35:34 +0530 From: Shubhrajyoti D To: CC: , , , , , Shubhrajyoti D Subject: [RFC PATCH 3/3] i2c: inititalise the actual transferred to zero Date: Fri, 29 Jun 2012 16:35:27 +0530 Message-ID: <1340967927-27354-4-git-send-email-shubhrajyoti@ti.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1340967927-27354-1-git-send-email-shubhrajyoti@ti.com> References: <1340967927-27354-1-git-send-email-shubhrajyoti@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org In i2c_smbus_xfer_emulated initialise the actual bytes to zero. Signed-off-by: Shubhrajyoti D --- drivers/i2c/i2c-core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index a6ad32b..fa7f799 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1949,8 +1949,8 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr, unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3]; unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2]; int num = read_write == I2C_SMBUS_READ ? 2 : 1; - struct i2c_msg msg[2] = { { addr, flags, 1, msgbuf0 }, - { addr, flags | I2C_M_RD, 0, msgbuf1 } + struct i2c_msg msg[2] = { { addr, flags, 1, 0, msgbuf0 }, + { addr, flags | I2C_M_RD, 0, 0, msgbuf1 } }; int i; u8 partial_pec = 0;