From patchwork Fri Mar 22 14:08:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160899 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp859468jan; Fri, 22 Mar 2019 07:09:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQdM7pwwh+TdL3oM5VApWlTlQrMfv+D5FW0wvVBepA/qGmVSOlCn98LsojVpt+xweWgOJw X-Received: by 2002:a62:4d43:: with SMTP id a64mr9250408pfb.157.1553263788439; Fri, 22 Mar 2019 07:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553263788; cv=none; d=google.com; s=arc-20160816; b=E/aHDxCrmZcGNk0c9q99iDOysdvU6n2HvD5Bd7fAn56W0mngrmfX5l+ecViZlPxluC E8cM+uT6STKL/kWj4knFgJGRPTYEjexhIBWKgGmYXs1ekI6z4H0ZuKqxZMZd0QBuUn+O sr0+BPGwzWeIMGoAG06VF3QE/ciTRwTIYBID+Thc1pm+SfZiF74apoq5iIHhWjK0kYMo RI+tWVNBA7HbJ1FC41k+sRaHLVIh3Cpzu1BCatMD7R97KyJ6hSjevwLIk118TAUBU85O 8T1V3bFfkyw+wgZsJWZXozg1J5SBUEHI1+VCfAECO+M8igNDB5zqnT8G12dGycxjJ6ED yD8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=p7+IUUADpytyqJSlzikphasWcBO7ITH2lcAr5AdqmrA=; b=PtSAU56RXiDtR7Kl3WozuJzDyKFYywgQ6EKaVqPyE6acL90MpNyuqUYEXqvj2ghE8U bRAb648Q3OMArjwYB9E83ZwbebYkz4DLo785h5+F8J3aiOOYWmtArxP2a9lAlEpyc57G kI6NXkzOUFuclvlmP+vk/thL/aroBeGYUE6a8snCZMcvGqc06rOXBBq5mf2c1FJ0/aZ7 ZovdRJ5dw7Kt8nb5kyeixRzWJMffsz+3hambDS7WqREpAU8E7bZkFi8rFMoXtf2tRmuj zvD5r8fAJezOODZ+NGfOXlViGi8wf2I7piihqwEf1PoR/3M0Z8yTshvlRatNEM3+9lrN lHuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si7443327pla.195.2019.03.22.07.09.47; Fri, 22 Mar 2019 07:09:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728622AbfCVOJq (ORCPT + 31 others); Fri, 22 Mar 2019 10:09:46 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:55729 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727943AbfCVOJp (ORCPT ); Fri, 22 Mar 2019 10:09:45 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MGzDv-1hCXvq27sJ-00E25M; Fri, 22 Mar 2019 15:09:09 +0100 From: Arnd Bergmann To: Jonathan Cameron Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Max Krummenacher , Lee Jones , Stefan Agner , linux-iio@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: stmpe-adc: avoid harmless clang warning Date: Fri, 22 Mar 2019 15:08:39 +0100 Message-Id: <20190322140906.319267-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:LsArqJRnc8Nh4Hs3awc98LbB0oEkPJppi5wt30jJ9pQ28ugEIk/ Jm4cAL9MCDBiFJr7VLu+YWUmfnMBojlNyJEKZ3rSOByCQiTjc+Y42edEmBTwRKjEnXgRkta fuquITpE1ZPhoI4El/oshu1jTZQwKwfpBDjxGWK3A2Ons3shPsBySLhLInMy2Zfk52S769Y 48xqpH5mDaOFBAbSo+d6A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:Bg8IhLpgIxU=:+PtXwVmnCw+djAtLG9I0nn ejsH32So6S37sGTZioLsBgCRZZDqzoPaDMd+nCqUoNhn4tnl6fWFjqf5d+i+S0P+zYjtIhOmD WsP4IhOzrIKLbTMFBOm1Zw/MWVVWT+0JUy+tlHCnIIlrjUTm5qBMNCoL98MqM+xgAtrlZn6Kn kOfiEDuuhW0CVLlLNZCQfe/Df5vZrHLvvkYBNKUzGqy8IifrIM+Ue7vhDT91E8xQa4dr3Fr3j R9yWRlX+5ZF+8MPCHHoicc3kYoslm6x71NUgu8aBlp/Fo9FLIuQdI38J0lu1CH7lvC7piLYho vy4mR7UvlxpeDoc4in2Oar3NbPqQiRiZJZ5vdLOHWpK0mw/sGqvQt0kJ4TLYnKkIaqXiyg1HE jC6kEicb2Ztl0tEDHlqxJxjzu7FhuGM4kOpkZ9AMCnmFS3klD4Mk0wHUA/tliK1kGoP82Z4ox 8voguriLbfR5UyN6ujS09uz70iQM0/aMH8DEdhtr72Wf/R1/LjkeUJc0gxKSikn3tkaICpccf JcTCMBM5K0HeiS/K2QYw0ENxdkqNzFcDAiXBdoDBNXEBc4sMPtDQreJWeWJdb5RaQelJec5v1 bRuhvWKst+/JlwMk6rAs76BqZlvJA2mBHA1vOkUxMMM8VNlJRzs8C/CVCcqzIB6E1XThW1/gq rhcgf/j9O7gdvaeSFgU55zFbQHz4ZIdcmt8OF4Bq/wEauPbNCRXQVqAfAHptULP3shbKycILj an/9swV2ILGCXbdz+hDUfzbDbHLo6vlPQXKQkA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang points out a control flow bug, which happens to be harmless: drivers/iio/adc/stmpe-adc.c:204:13: error: variable 'data' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] The warning is sensible here, so let's just avoid the case by adding appropriate error handling. Signed-off-by: Arnd Bergmann --- drivers/iio/adc/stmpe-adc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 diff --git a/drivers/iio/adc/stmpe-adc.c b/drivers/iio/adc/stmpe-adc.c index 37f4b74a5d32..ed3817c5c896 100644 --- a/drivers/iio/adc/stmpe-adc.c +++ b/drivers/iio/adc/stmpe-adc.c @@ -205,6 +205,8 @@ static irqreturn_t stmpe_adc_isr(int irq, void *dev_id) /* Read value */ stmpe_block_read(info->stmpe, STMPE_REG_TEMP_DATA, 2, (u8 *) &data); + } else { + return IRQ_NONE; } info->value = (u32) be16_to_cpu(data);