Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp261105ybg; Mon, 1 Jun 2020 00:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4tcjzZQDFT4bjFn2852ibkZRvY89kXQF98mvpo1CW05cSdvHuGwWdKysQW8ToM6QGKMZw X-Received: by 2002:aa7:d985:: with SMTP id u5mr17154109eds.160.1590995411450; Mon, 01 Jun 2020 00:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590995411; cv=none; d=google.com; s=arc-20160816; b=uzq/YWewTJ881Xi5bErRbU4nfoWTYOPvOJV2qHYQA1yJH+J+rpL4ytQBSJE+2iL/OJ pr32omSmzjd/+c7wK8gHsRAOW+zWtRuP06FU2vSfr0AjL8hNOnf2FztLatcnI9YM+bi8 WFTRBkQmpCmuVAnYa9MZEkavKtNYAoFx5pgsSIMKuJ0/7dihtD3WG78RhG3479seJEWM pbA/ONzsJRMgpgs6kkbcMXMoTbGThsyIBfS+ry/dYaeyvJdz0EIVgzNzir7jrZ6ue8Th /QbFLFOf2BvIZytYw9wwv5uE64EMh8/P2MlE2H1LsrhhYwaW6PGLlb90+f0PlBiay4gv 8ysA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M6H6i0Eh/2aEE2Hihio/iMjOVmuBrf3WccAscdjEyLs=; b=X+ztXB24U22vCTOocxosc93Zm2BFPD3UlosO63C5FWCelxskttkCI7VEcXVysfHF94 VMaLs6laGwlHJmlZWuO/RbEQeR9wXHVQEdk+5JNqNjQIHUnav6LaQr+1kyLCvYvIKypp gOPflF7iKNyfTzz4+kx7uRy5nMPLg38dOH0WL6siqQVnhfZ4Nk5aiCEUrVjtIvS9+6Tw I8euSwgNx+DSSby5+qEIoOpN4k2kC94DQNLRohFjCCD2R7Crkv6/z85MY3+RGrRlLfiU Pp6XPWGmdViwFZ2660DLTW/6hiWZbJCSo95F8vRVfSlOWu36vWEY3A8yceA5TBw2cagx q9ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=V3Um2iZK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p19si6292313edi.567.2020.06.01.00.09.48; Mon, 01 Jun 2020 00:10:11 -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=@ti.com header.s=ti-com-17Q1 header.b=V3Um2iZK; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728178AbgFAHGC (ORCPT + 99 others); Mon, 1 Jun 2020 03:06:02 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:49728 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727118AbgFAHGB (ORCPT ); Mon, 1 Jun 2020 03:06:01 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05175QTg069541; Mon, 1 Jun 2020 02:05:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1590995126; bh=M6H6i0Eh/2aEE2Hihio/iMjOVmuBrf3WccAscdjEyLs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=V3Um2iZKeCIDPp82s7Hw7RTs/04nPa7j7mmYhd/IZRLx/OCD07nkxzIB9Dyjb93kk BFs3Wd+B0ky40j3DfxThgD7+ItxTmvZV7ppFJYfnXRsAopO2axDpymStgHIC1aPdvc 1zFDV+qYB9ZimkTMLhL8c9lI/QJDvhqOvAaID0lE= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05175Qa0061997 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 1 Jun 2020 02:05:26 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Mon, 1 Jun 2020 02:05:26 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 1 Jun 2020 02:05:26 -0500 Received: from ula0132425.ent.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 051758s5016257; Mon, 1 Jun 2020 02:05:20 -0500 From: Vignesh Raghavendra To: Tudor Ambarus , Mark Brown CC: Vignesh Raghavendra , Boris Brezillon , Ramuthevar Vadivel Murugan , , , , , , Subject: [RESEND PATCH v3 3/8] mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure Date: Mon, 1 Jun 2020 12:34:39 +0530 Message-ID: <20200601070444.16923-4-vigneshr@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601070444.16923-1-vigneshr@ti.com> References: <20200601070444.16923-1-vigneshr@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If driver fails to acquire DMA channel then don't initialize rx_dma_complete struct as it won't be used. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/controllers/cadence-quadspi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c index 8a9e17f79d8d9..379e22c11c87f 100644 --- a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c @@ -1180,6 +1180,7 @@ static void cqspi_request_mmap_dma(struct cqspi_st *cqspi) if (IS_ERR(cqspi->rx_chan)) { dev_err(&cqspi->pdev->dev, "No Rx DMA available\n"); cqspi->rx_chan = NULL; + return; } init_completion(&cqspi->rx_dma_complete); } -- 2.26.2