From patchwork Thu Aug 28 13:14:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36202 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C612D2054F for ; Thu, 28 Aug 2014 13:14:47 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wn1sf7685035obc.2 for ; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=mMnFxR3vYPzClMRV1ageKg3AVpWVR6Fmg/EbJ5ftGkk=; b=MuhB4xeG+KtSCdu+jfHSj1E3nu9SMXJdBDfzSMPepILo8l+oXQwhuGQw6E7VARtb+7 DGYRJx57SsG3ya4WzjfBXjZsSrbmjtVOYj0eaN9zVofanNJKZ4Z+ky1gs9EcyDHr6xNX Zdw/JUYNtVudlCk2lmnU/FiI7tEwhIleuwkrulCLWUn3vzLG20YUdoAOjNyUpLGeiV8J joxTsfTRqoBID3lzSPtQOzXlQ435JMeMXeRBjgH09LM+kftz2GNA7bNklCDsvdSODZYE 09KifyNMf1eEXA2ds5RY9qAypARhVO+sdZ49MYFY417MDuNO8kLA1ESwQMdl3gg4HKoo 103g== X-Gm-Message-State: ALoCoQk9qD6UJu8DXExAyunB9m7qo+OW5LNoRgdsRD0HzJbTpzhIPznJ/o9FA0hxUqVlB9MGb9dn X-Received: by 10.182.4.73 with SMTP id i9mr2075484obi.28.1409231687398; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.16.112 with SMTP id 103ls593241qga.9.gmail; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) X-Received: by 10.52.145.204 with SMTP id sw12mr423544vdb.79.1409231687240; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sl18si3357061vdb.42.2014.08.28.06.14.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so775881vcb.9 for ; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) X-Received: by 10.52.73.202 with SMTP id n10mr415493vdv.86.1409231687176; Thu, 28 Aug 2014 06:14:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp234668vcb; Thu, 28 Aug 2014 06:14:46 -0700 (PDT) X-Received: by 10.50.171.199 with SMTP id aw7mr5224475igc.27.1409231686608; Thu, 28 Aug 2014 06:14:46 -0700 (PDT) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx.google.com with ESMTPS id l1si4068953ico.25.2014.08.28.06.14.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:46 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.172 as permitted sender) client-ip=209.85.223.172; Received: by mail-ie0-f172.google.com with SMTP id rd18so907495iec.31 for ; Thu, 28 Aug 2014 06:14:46 -0700 (PDT) X-Received: by 10.50.80.116 with SMTP id q20mr38315175igx.22.1409231686324; Thu, 28 Aug 2014 06:14:46 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id w8sm16633672igl.13.2014.08.28.06.14.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 06:14:45 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Lee Jones Subject: [PATCH 10/11] mfd: twl4030-irq: Check return value from twl_i2c_write() - warn() on failure Date: Thu, 28 Aug 2014 14:14:16 +0100 Message-Id: <1409231657-18294-10-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> References: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In the original code a return value variable was provided, but it was never checked and the user was never informed of failure. Now it is and they are. Signed-off-by: Lee Jones --- drivers/mfd/twl4030-irq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index b1dabba..1b772ef 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -396,13 +396,17 @@ static int twl4030_init_sih_modules(unsigned line) status = twl_i2c_read(sih->module, rxbuf, sih->mask[line].isr_offset, sih->bytes_ixr); if (status < 0) - pr_err("twl4030: err %d initializing %s %s\n", + pr_warn("twl4030: err %d initializing %s %s\n", status, sih->name, "ISR"); - if (!sih->set_cor) + if (!sih->set_cor) { status = twl_i2c_write(sih->module, buf, sih->mask[line].isr_offset, sih->bytes_ixr); + if (status < 0) + pr_warn("twl4030: write failed: %d\n", + status); + } /* * else COR=1 means read sufficed. * (for most SIH modules...)