Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1387308pxb; Tue, 17 Aug 2021 10:25:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTaIg53rZaraDCv1nLG9QE/dtUDSoWqR71M1/Wvoxb2ioElitisdxsD6SSVLcfjn15DDod X-Received: by 2002:a6b:f40a:: with SMTP id i10mr3727723iog.139.1629221103614; Tue, 17 Aug 2021 10:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629221103; cv=none; d=google.com; s=arc-20160816; b=esCC2M8iBBX0erbrTOqZJA4E+F3A2P6sDjcNZYmkxYwABp1kw/5+6r5tVcG17LrRaE KLQKOo3Rvesdhc4NK51Z1cG2KaVPeIHQPOLCfOaWn+VCgQkEdZKIdbVqf2mVFOmWl18M /qrXMVpc3LhytlmYevGnyU/BsY4Oltqv63mZjhiBwAfd8DiGVPzfbiDrLa2p8vSKlNM1 sl+Hk87tb/xJEMGVTHCo2FHA9URMdIgIjWoPhfHAjDixjelsctP67l3cOPP9WTnZAVpW ivmgPssvRjA1ZSARGFbHCZdvunSQgnptATPV9wzTO1qSFvJNy+QPr0kWsY3v1KcwZSG8 uCSw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cnxPmKp+RyLu2md5DjVc5e+v+zyOhG6XgMhIx28x8+8=; b=HAdaQAalxasf4JQOs0gMXyyGYa2wMY9BbfKRk1mEaJCGNkGpTPcM9zSIr6baMYiMeo K5heC81QXDUcxdKfSY/EGMypUd92iJ+HYv5pYLvOxsn2UHHQvGYmuSjRaa9zqr/Nhdp4 uILIg0kiJkYyUCXdGVn+T3VZFt1TOiIsOYtUKMVo0KE1S0HAz6IGRlaQKjJtXrHnrQaa GFKYheaGyvUkknUZZe/Iwr8ZiyTA4hTw1kqJKRI/5+syf8ORQoxaxq7IBvR+JDn7vVWs nObevPb5oDfrpjCC6+wbPZnOZ4Uj2FMdsge4/avSWM7gKvzhVXK/mOUT9SopOcI1u//6 iIcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=mI1HRmsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q14si2856185ilm.44.2021.08.17.10.24.36; Tue, 17 Aug 2021 10:25:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=mI1HRmsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231587AbhHQRVs (ORCPT + 99 others); Tue, 17 Aug 2021 13:21:48 -0400 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]:57576 "EHLO smtp-relay-canonical-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbhHQRVr (ORCPT ); Tue, 17 Aug 2021 13:21:47 -0400 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 9971F3F336; Tue, 17 Aug 2021 17:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1629220872; bh=cnxPmKp+RyLu2md5DjVc5e+v+zyOhG6XgMhIx28x8+8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=mI1HRmsEIdO1o+FJEGWTJgzlDYOXxIgNwbxirg4xLBQEC5lb/NySOyoP/QaMg1gHN 6+sU5JuAoFv7AzGU/sffv/y0y05EjeaDc35xz0v+Ekw2RucxNUNCcg+cXYFcQxhpwg DAIfb6pTTJkkcxRBx22stMj6dtWn57Feo0TtBpcdA5LvemVI99Z4ll8gRwUkY1Cp/T 6q/ss3k7sXBHM59qBb4qmsYiFzMTS/XKRAxFt1r5++rat50pVBjMppcbMBh+Yr3OMk rGmtbkiJNO+4Gq52py3M7giZXPK3Upf8+n1A6qtyNyU98T2iCAHx9ldE3Nabw6ZE3+ FwHRnun1FaylQ== From: Colin King To: Lad Prabhakar , Jonathan Cameron , Lars-Peter Clausen , Biju Das , linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] iio: adc: Fix -EBUSY timeout error return Date: Tue, 17 Aug 2021 18:21:11 +0100 Message-Id: <20210817172111.495897-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently when a timeout occurs in rzg2l_adc_hw_init the error -EBUSY is assigned to ret but the error code is used as the function is hard-coded to return 0. The variable ret is 0 before entering the while-loop hence the fix is just to return ret at the end of the function to return the success 0 or -EBUSY return code. Addresses-Coverity: ("Unused value") Fixes: d484c21bacfa ("iio: adc: Add driver for Renesas RZ/G2L A/D converter") Signed-off-by: Colin Ian King --- drivers/iio/adc/rzg2l_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/rzg2l_adc.c b/drivers/iio/adc/rzg2l_adc.c index 9996d5eef289..868b183e75ea 100644 --- a/drivers/iio/adc/rzg2l_adc.c +++ b/drivers/iio/adc/rzg2l_adc.c @@ -401,7 +401,7 @@ static int rzg2l_adc_hw_init(struct rzg2l_adc *adc) exit_hw_init: clk_disable_unprepare(adc->pclk); - return 0; + return ret; } static void rzg2l_adc_pm_runtime_disable(void *data) -- 2.32.0