Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1931347rdh; Tue, 26 Sep 2023 07:40:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDCSEp4fZuCRbvW/VRMpb0bfLyjxBcY2sAlOMCdo+HLnMyYseFmwFaPpJ1xbF2jbSODtdk X-Received: by 2002:a17:90a:ad90:b0:276:e14a:4991 with SMTP id s16-20020a17090aad9000b00276e14a4991mr7289348pjq.2.1695739229515; Tue, 26 Sep 2023 07:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695739229; cv=none; d=google.com; s=arc-20160816; b=lYXbLBRWjBvPnElLBZbKPou6ozTspqy6b8zo1WpdbcBLU2owyiAc3ixyskqUNQpADg 5Gydpjg97ZsmzJWQ/IVbFnkflja6D1zZ2LQPeOwciG5guRKreAWAnwgBgBAuFGAa+9n1 yjVacqt/xWDDsIs1j1Xw+K7B7yTeUtnkf7WXpPDq3fqyH6EHSJGIs0m/cIbwz5OGm3k7 J4lfl6gQNCgXWletAFdzkhYizlnIgkIT5ghUEPIvEvRdmplFJl/Q09bW6i2IZceAIqEI 2jrq1QK4ab55Gi09i62grKLmqV8cjUVVX9Wl27AKy62ddVvy+mToqimjECQfDuxWLSG3 p0rA== 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=ebZF1O13WAp+405gFWGsAvB8HlRo5Q6+vLZ6sLpiBy8=; fh=TWPTJZL7PHSOEEMVTqGIH+uKAiNNCdHaFG7dBC8BuJw=; b=yhGOHHqpBRN2/2ZsWYjC1Vc3L4j4r+KwJa1X/9lpT93CLr9rLl6jV2XIAwc5/rjhRw eboNNAvzEMb7EzOaFZe20adtKV5r1LEEPt9d5q6pIYjWY/Jpw13NMKaYEyfnu19oPyEA p/IQ/mHK32m6KRKHwmNSl9mkJqfCfx+viOPX8n7mQ1NQf9DOPA0ayN/b5QFWLxahIDEg 7aistLK5qRuc5QPO6fVAKSLwR65T5/wmmPHzfWZ+KfHkg6KHLTkCeyyPiXDosDYZN/x0 Pp4eXiarL4sEDStLI6kvMzv27jSzqis9RhD5n19dd/HHOgRaybIuCi1SJE0ISidA8/nB smvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XgmKW3nU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id em10-20020a17090b014a00b00271c377a534si12291334pjb.104.2023.09.26.07.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 07:40:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XgmKW3nU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 400B982CBA45; Tue, 26 Sep 2023 06:11:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234800AbjIZNLm (ORCPT + 99 others); Tue, 26 Sep 2023 09:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234816AbjIZNLi (ORCPT ); Tue, 26 Sep 2023 09:11:38 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7889C127; Tue, 26 Sep 2023 06:11:29 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 38QDBNcp105109; Tue, 26 Sep 2023 08:11:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1695733883; bh=ebZF1O13WAp+405gFWGsAvB8HlRo5Q6+vLZ6sLpiBy8=; h=From:To:CC:Subject:Date; b=XgmKW3nUUT3Ksyh2yvr0R17cxyCHthrF5yMZMdYrfxqsYcjB9plVHPwxkLDDGiuyK QNteaAG5UqGtYL+ob3CiacZPvdWw2C7x8aMAINXRH087gxFF+hmQXT+NF1gkn8Xm4F 1ysLacnldGAWH85WfQwid800CsR8RKA4Mo+e3UEU= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 38QDBNfe014547 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 26 Sep 2023 08:11:23 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 26 Sep 2023 08:11:21 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 26 Sep 2023 08:11:21 -0500 Received: from dhruva.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 38QDBJQk092098; Tue, 26 Sep 2023 08:11:19 -0500 From: Dhruva Gole To: Mark Brown CC: , , Vignesh Raghavendra , Dhruva Gole , kernel test robot , Dan Carpenter Subject: [PATCH V3] spi: spi-cadence-quadspi: Fix missing unwind goto warnings Date: Tue, 26 Sep 2023 18:39:27 +0530 Message-ID: <20230926130926.314751-1-d-gole@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 06:11:39 -0700 (PDT) The following smatch warnings were recently introduced: drivers/spi/spi-cadence-quadspi.c:1882 cqspi_probe() warn: missing unwind goto? Fix these warnings by releasing dma channel and adding a goto fail probe. Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/5e21c351-cd08-443e-8509-aecf242a4da9@kadam.mountain/ Signed-off-by: Dhruva Gole --- *NOTE:* Please base on top of origin: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git branch: for-next Link to v2: https://lore.kernel.org/r/20230919074658.41666-1-d-gole@ti.com Link to V1: https://lore.kernel.org/all/20230915123103.2493640-1-d-gole@ti.com/ Changelog in v3: * Rebased and removed mixing of links from commit message Changelog in v2: * added dma_release_channel * added a fixes tag. drivers/spi/spi-cadence-quadspi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 4828da4587c5..3d7bf62da11c 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1878,8 +1878,11 @@ static int cqspi_probe(struct platform_device *pdev) } ret = devm_pm_runtime_enable(dev); - if (ret) - return ret; + if (ret) { + if (cqspi->rx_chan) + dma_release_channel(cqspi->rx_chan); + goto probe_setup_failed; + } pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT); pm_runtime_use_autosuspend(dev); base-commit: b643e6268c8f466ebb08a594b8ec8a1e2fd275a2 -- 2.34.1