Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp568175rdb; Tue, 19 Sep 2023 04:10:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH//tMLwgW8gIP6DNHLpvrBw/a8FM0EJsYjgsyra3Xag1E+FKjoYE6JXalyAQfyVolBwDw9 X-Received: by 2002:a17:903:2442:b0:1c3:aa8d:4daa with SMTP id l2-20020a170903244200b001c3aa8d4daamr12479003pls.44.1695121856089; Tue, 19 Sep 2023 04:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695121856; cv=none; d=google.com; s=arc-20160816; b=MPLAJQgHTfQkCTg1S+yQ5T5YbMCtNZ0NQ0lU/sqp2oKgr+bZCV5mfA9huqAB0qNw1R EqHJJpHKBDktFfJDD6YaL1mizWi34uXdvDvePW413+7ekSF9iK2YVQ6/EfIesMQ64Gtx 0+r7cMiyF3s0UcmIqd8slqLp2y3QR90ybdR4nmA6BywSCuDuIbJla8lh0uy2i2RKPb2w S42hvHjbSav5PJDrYiFh6X613hxwBMvY7zcAEfjm3nMN+jGN24K1I9fzMJc8daSED5JG XA0OWqgCkmsHpDydDVMn3dTQhvtNT0Fu2Fd7pmy3IIlc3r0VH5K61H68bJ6DZGiHk8g/ ENfw== 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=91XuODQwmCtWYnSSTBcS0qNvMDSn/h7K7GVyq9zfEiU=; fh=TWPTJZL7PHSOEEMVTqGIH+uKAiNNCdHaFG7dBC8BuJw=; b=i8GmMer6/5yOVDHYiYd2Fb4UPLT59BB8VeTgg3KrSP+Qf48uz2q+KQc1kPB/teh/Ad 6wFULvdzpzrigS7q9yquct1/DYnIWBFttGZKDcyLiPYKoIFR6IkSEu01BE+/VNQYVxKW LsTHvoB+69ls/myRjtWOhUBafwHzmtBYLJkMb5eQtXu/xPKPt10tx7Nv8+yrCCbx6WwB z48DY7fNtn8pWYnRDWL1XG+tq9EYHle6xM5y1f+3rE8m9oMhMb5+g5m1zS219s/nXroY +MF+tFRvDpv8yPV+jXiicffQLrC5XOjYHpacnmJjn4clDtwQF3J3CwoY6H9REv3h8kkc d98Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qzW3RWcW; 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 m1-20020a170902db0100b001b7fee7d5f0si3935464plx.25.2023.09.19.04.10.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 04:10:56 -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=qzW3RWcW; 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 D3C1B80EBC84; Tue, 19 Sep 2023 00:51:20 -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 S230437AbjISHvX (ORCPT + 99 others); Tue, 19 Sep 2023 03:51:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230371AbjISHvV (ORCPT ); Tue, 19 Sep 2023 03:51:21 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CEB10F; Tue, 19 Sep 2023 00:51:15 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 38J7p8tc095988; Tue, 19 Sep 2023 02:51:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1695109868; bh=91XuODQwmCtWYnSSTBcS0qNvMDSn/h7K7GVyq9zfEiU=; h=From:To:CC:Subject:Date; b=qzW3RWcW3FjrPcM1BJydKl9zeSQ/ogpyni2zDGyhsk6wweqPQPTYI8k8wkN6a4dlo SQDG6c2LNVMjfkyIQds0gTSrkTOw1j1vnptliYROq+LjLcWDoZ5bFjU9rQ/SlXfWzK 0/eL4v4zuwGhfjzNeY3oA9wTO2BdL/bDaQ24SrVc= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 38J7p8rU127667 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Sep 2023 02:51:08 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 19 Sep 2023 02:51:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE103.ent.ti.com (157.170.170.33) 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, 19 Sep 2023 02:51:07 -0500 Received: from dhruva.dhcp.ti.com (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 38J7p5Sg116649; Tue, 19 Sep 2023 02:51:06 -0500 From: Dhruva Gole To: Mark Brown CC: , , Vignesh Raghavendra , Dhruva Gole , kernel test robot , Dan Carpenter Subject: [PATCH V2] spi: spi-cadence-quadspi: Fix missing unwind goto warnings Date: Tue, 19 Sep 2023 13:16:59 +0530 Message-ID: <20230919074658.41666-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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, 19 Sep 2023 00:51:21 -0700 (PDT) The following smatch warnings [0] 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. [0] https://lore.kernel.org/all/5e21c351-cd08-443e-8509-aecf242a4da9@kadam.mountain/ Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202309140543.03dMbMM5-lkp@intel.com/ Signed-off-by: Dhruva Gole --- Link to V1: https://lore.kernel.org/all/20230915123103.2493640-1-d-gole@ti.com/ Changelog: * 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: 21f252cd29f08892d48739fd7513ad79c1cff96a -- 2.34.1