Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2908083iog; Mon, 27 Jun 2022 05:32:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v4RDgxdFBsguMFIKVYCNdrCGpd5Ga2ZYND4R3lTPj4X+t6d3foK+MQ9RgIT16HHWETmDLn X-Received: by 2002:a17:906:b1c1:b0:726:b009:4b63 with SMTP id bv1-20020a170906b1c100b00726b0094b63mr2919861ejb.24.1656333171929; Mon, 27 Jun 2022 05:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333171; cv=none; d=google.com; s=arc-20160816; b=R5gB0ZYNiJel/2QF86yGldX+tx69+B7cCjjjKnAx7O9g/1Bb+dsXhLfuTyuH2AdgJ1 W9RGGhYcKhmblG2LN6iMF79dzaWuK/kA/YPo3l0W4g2qshuyXY/lCfmh/tN6MSBNPP82 N21V50Y3/oE1Ed38Scq8bSf2jXVngeDky/QhklHQp9q5yoPHskg6Xr/ecn0qbJilx4As fgcWVkBFI0/QiRJGvir0poUXffTtrz/zFwYmZb9eoQfSpZGILYNOPrqQflH8vmu4P4Rs D+HCCj2Byt6gFQc+TX66q9BSJZOMusM1vmlFEky2dj60xIGai0uPjRSaw9VrOWi8fBzG GqZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m3hruoncyQKD80c8LCyj505TXt61N6ekSJ/9xlHqDKs=; b=Mx1ug/q9CLOGRUPOrVQW0ydhHrh9Z2C5KsavbsnPRFyU9Nh0HZUHXtAxOjURbUm1FP /C7oh2foV/WGxpCb7oR0iKHmKIXpAA7BvfDYB6lpduLtFhOBl4elnkwrP7BS+/cipXYg 7SY/55QYVgqCdOFfLMo+boStjXN7sB3Iu8ztv1WmIMRw6My7gdR1rxALs1rN43DcnkQA Xv/NFFf6t1PJVfSYDZGwBCqhkcvoybNYCvw6avCY22WKJ1V0ywAnG28mEiO95qG1pFJ9 EX16BWlCuadc3Rc+MUbvW4+ztrDrtlM2Xd9TtmfPLtXhNJjk81dZ2AQTbfNpk3dtjVv7 Yu0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XY7uRXaE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a509344000000b0042ddac25209si13211061eda.92.2022.06.27.05.32.26; Mon, 27 Jun 2022 05:32:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XY7uRXaE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239647AbiF0MAh (ORCPT + 99 others); Mon, 27 Jun 2022 08:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238922AbiF0Lwt (ORCPT ); Mon, 27 Jun 2022 07:52:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57462DF22; Mon, 27 Jun 2022 04:46:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E91A3B80D37; Mon, 27 Jun 2022 11:46:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50C86C3411D; Mon, 27 Jun 2022 11:46:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330387; bh=SxpGI+CQk3fn6M8/MgNMGVqxpD3nKniUZv1qZm4HGwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XY7uRXaEps9mOa4O0Gwi+kNrzkoNXynOUYhKr5DcOvV8w8JGfHJGOeRcQc4NvNBUZ Aqzj1CALBJtMW71GmzBMnAZUNi7UwmVFbyMYGxqUIYP4cmMcNDZWQ2bF672yqQyG3L iZI0ju83birm18lPptqiz02Ipk6kgez/YO7tCnGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aashish Sharma , kernel test robot , Stephen Boyd , Gwendal Grignou , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.18 131/181] iio:proximity:sx9324: Check ret value of device_property_read_u32_array() Date: Mon, 27 Jun 2022 13:21:44 +0200 Message-Id: <20220627111948.489224737@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aashish Sharma commit 70171ed6dc53d2f580166d47f5b66cf51a6d0092 upstream. 0-day reports: drivers/iio/proximity/sx9324.c:868:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Put an if condition to break out of switch if ret is non-zero. Signed-off-by: Aashish Sharma Fixes: a8ee3b32f5da ("iio:proximity:sx9324: Add dt_binding support") Reported-by: kernel test robot [swboyd@chromium.org: Reword commit subject, add fixes tag] Signed-off-by: Stephen Boyd Reviewed-by: Gwendal Grignou Link: https://lore.kernel.org/r/20220613232224.2466278-1-swboyd@chromium.org Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/proximity/sx9324.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/iio/proximity/sx9324.c +++ b/drivers/iio/proximity/sx9324.c @@ -885,6 +885,9 @@ sx9324_get_default_reg(struct device *de break; ret = device_property_read_u32_array(dev, prop, pin_defs, ARRAY_SIZE(pin_defs)); + if (ret) + break; + for (pin = 0; pin < SX9324_NUM_PINS; pin++) raw |= (pin_defs[pin] << (2 * pin)) & SX9324_REG_AFE_PH0_PIN_MASK(pin);