From patchwork Fri Apr 2 15:01:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 414379 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1479437jai; Fri, 2 Apr 2021 08:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze/1zSvhZ0VrK+wft5XWAJeHa6/2Y7AZ4vcN8P9EyUtX3Kd4OYV/sMG+hvmQgO8HFbLz5P X-Received: by 2002:a5d:654a:: with SMTP id z10mr15958712wrv.335.1617375734685; Fri, 02 Apr 2021 08:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617375734; cv=none; d=google.com; s=arc-20160816; b=ID2R5KpT8unHlWl5EoTHHW99DlGIfwgXHtI0GFeB39HsUTA+0XaMkxfOdXjD8eWEex 84BucGQmHNUr6GTFc62c4w2a9coxOISfmSLcYyDp0W7f3bFQdI9/jogibNdPT8co+E5Q U/vmdOKOZxyZb4Nqnp+/3JtyverTP5drnQY8TwTUAqsrG7qMX5BRWJjJAJnRuStTw9o3 Z2WAyPlX2Gtjd+7aonKLK2e51bU/Iv2kxm3Ah+S0bzYFy7MiJ3eWOBx6nLUy36eo171F uZgp41rjNn596as/EyBBRACFNEo1T/+Oa2BU5dTrKANDkYYgaZVIKrfKd5110yg5SnPJ dI+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ww076wtEw/l52B1eQC1HZmnMQQ8Ebtr9JfK+3ViX3so=; b=evHelnRiT4JQzVj4oO8CFHHuj9SPKei3NuSOptxfx5Z1HG1Emj2ffJHK7S+V2EG++2 NHomb7Oi2W2c79YVcP/AZyNj0OWQ+uraaPLlMeCtrYBUaIb4b42LQTXOcLOU/PruGIoC e87E871n2KHq/y+4DnIe/VbudSFso+8OyM04nh8f9XLOpWAWPXMMXQ1ZNMNeL6VC1owW HZuNwdYoDRuF19jseW57vhL4i7db0E+cGUoFfd1OCol3rnalhaHLuvkcvEVRkmp7lsQ9 AiqJ3eU+Fm50sGuIHOU93NFTVZWalu26lSrIh3+10uBer2H1/T+kMMWSLcNEBCiKp2W1 ZHLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ybrJ/XWa"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si9183462wro.380.2021.04.02.08.02.14; Fri, 02 Apr 2021 08:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=@linaro.org header.s=google header.b="ybrJ/XWa"; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235069AbhDBPCM (ORCPT + 6 others); Fri, 2 Apr 2021 11:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235250AbhDBPCK (ORCPT ); Fri, 2 Apr 2021 11:02:10 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FBF4C06178C for ; Fri, 2 Apr 2021 08:02:07 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id v8so2622978plz.10 for ; Fri, 02 Apr 2021 08:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ww076wtEw/l52B1eQC1HZmnMQQ8Ebtr9JfK+3ViX3so=; b=ybrJ/XWa/mCxIE3noK0GCj+uKoLYgbMhcMQgqAAFk3B5fG/hCSYv/F1qtTUUcWn2Mu KxjVFEXJv/ORf4CfApwFggSqAln5Z3+I3OeriRpumvglfjwXC6h7dhcMnPmo07QJ/+ZG wwHjxZZb0wehKDxWPQ3AgMwikrdDxH05aNo11bZYQFDvjaEI1ie62PbcR0VTcNg5pz5n cAwjmX45Pn+yiGFbwQ3PqPvCRzA/Won4h4uiO+pCtAc2G9jgY63mG50TtcT9rQuodYpf XLU5cPfAZmlgju7jpwNLZsdsq3RtrSCd+icLLJESKQcSj5RD+fFev/lCAQ92Dm7dekXh GtPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ww076wtEw/l52B1eQC1HZmnMQQ8Ebtr9JfK+3ViX3so=; b=c9KES4DvDsESaKY1lXiMbJVRsUgEfrB1DqaXZh9WEHUvAUEslj0vl+tBpzM5+6TTGN Ggwpno8iYbas7esmsj3aZOGTwfCwOMpmtISYGKFA/YyaWraG7TeYnla+6VJeQAM7WsyI sQvOa5H7oEi6em4iia5qm83ZgYs9s7Pcx/Z7cNI+wdoEWcxt46ocVk1lCLMS9fO+W5rl VDOYDd0DNfSXihee+svKYAEun9cmJMu2Aeq3+4YiuOBts+4hVzCUW0cke9HyKQmmtKFi uU1KFSck8WRQhaZZNTiSdapoYLIlLOwilud+9lgXsj0C0RQrcbSj6b1NK3tzjuY3vdbl w0VQ== X-Gm-Message-State: AOAM5314Zw8ry6O2sZKqdzvIlb4IKf3mgpebrMhNW0rEuboqRP507Hro veNp6dhgbKPGRnIDNcF2YDX9 X-Received: by 2002:a17:90a:c249:: with SMTP id d9mr14444710pjx.104.1617375725992; Fri, 02 Apr 2021 08:02:05 -0700 (PDT) Received: from localhost.localdomain ([103.77.37.174]) by smtp.gmail.com with ESMTPSA id x7sm8773647pff.12.2021.04.02.08.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 08:02:05 -0700 (PDT) From: Manivannan Sadhasivam To: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, boris.brezillon@collabora.com, Daniele.Palmas@telit.com, bjorn.andersson@linaro.org, Manivannan Sadhasivam Subject: [PATCH v11 4/4] mtd: rawnand: qcom: Add missing nand_cleanup() in error path Date: Fri, 2 Apr 2021 20:31:28 +0530 Message-Id: <20210402150128.29128-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210402150128.29128-1-manivannan.sadhasivam@linaro.org> References: <20210402150128.29128-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add missing nand_cleanup() in the alloc_bam_transaction() error path to cleanup the resources properly. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1 diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index 87c23bb320bf..fe74cf3aece5 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2882,6 +2882,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc, if (!nandc->bam_txn) { dev_err(nandc->dev, "failed to allocate bam transaction\n"); + nand_cleanup(chip); return -ENOMEM; } }