From patchwork Thu Apr 1 15:15:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 413620 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp650060jai; Thu, 1 Apr 2021 08:17:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6xckHetjOWefGC34UpF556sCPHeqARyu8WqWjHF74XLZJfkfroo9A5WbqjmwLU48rBnWs X-Received: by 2002:adf:b642:: with SMTP id i2mr10034825wre.8.1617290235956; Thu, 01 Apr 2021 08:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617290235; cv=none; d=google.com; s=arc-20160816; b=sU5hWybmaLDvj/67xP+JBbDzHzMKGd7eeJgetd9NNJUKbyd0QsetJjNeRMkk3Ph6YJ FqF8vmTGtXDDznTj+jflWU+Wcy/q05VETE+cb52faJNqpsqaUngF/gQKT/3jZlGFpcPq sW5+9liyqVhsAIGzrWGAwpi41nCm2M3nWwpJLNSDjbwFkgX3xKfd2s7Ai73pkjroODqG TDit/hUAcXbfsuUoSAnpF4V7g/k4kFqElIBoelO4hsXrJAiBqReTNThC0oXmk5Rg1RxA kcTHVhOFZ/dyvh4Jc3tZ/Jeqb+ihmBX7n7c0DzxPv0cCrzdrSRBTLbipDLmv8kAFt4uG 7HoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=5Ib6tvKLVT5OFYvHdMzx5cdtwfAJTJzvfy+jH0blGuA=; b=Jb/wEV6r3CBOk78CRwm4LDFBa6p6X3ZqL928RuSEKYyE7PIAJGPVJM46j2L3j0WIlV kOhAKPWLZsU83btA0qI1IoVm4Q8TpD+F593RDfJJbCQ4bCGDKjE9MY8ktXGa2yiCpOsC qnE7y9c2vA6+TdhTG8tsp5ondvyMXfPbwqxDAJ7rVp2KT/V8tYzTgB/IQs5UKJ8TXdqI WX9dLeQAn+1tXXhaAMMvkbIvS9tS96LpgAL0zDmwz5xNfunzIksQnNKVqsFKQR9fcH6b DmyxmCQw4EDB//uGMhOUiMKF9e+j+/0WzdYc6mustm3qkLw9hX+NkVVByk+7bBHLgWBn DkGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=desiato.20200630 header.b=E+ibjptT; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=tF+Bf0zS; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from desiato.infradead.org (desiato.infradead.org. [2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by mx.google.com with ESMTPS id x16si5803539wmj.202.2021.04.01.08.17.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:17:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 as permitted sender) client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=desiato.20200630 header.b=E+ibjptT; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=tF+Bf0zS; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1:d65d:64ff:fe57:4e05 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5Ib6tvKLVT5OFYvHdMzx5cdtwfAJTJzvfy+jH0blGuA=; b=E+ibjptTLD7R5xVpKl1010EpZ A5g++A8wmVswSxC2cgIOE0x4DG9UyVysYJYFiUci9/fAZMnqZBQSorjghFOmVq/PQHhrBNS54fvbi pnJquuqiPnb+voWigp2Qshdzoe9G47ECG+NO+vfvEKbWVxIHHa6LGn76ekmSC+93K5q2PyLxsQ4RK sobXV1nUZcmb8A2Ex8vEiEgK5dWvLUNJXPfkVfGVKORano2agWSY/ICbtDGfbEFFx97nr61BVCTin 3bwslKmR+7JQXm5DrOocHVQK4tYjVuoz78ua2DgR9tg6AUDeanN6Ro24KRuVXtM/sj/cl3X0J0Xav 7m2guAvtQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRz3g-009yo9-B1; Thu, 01 Apr 2021 15:16:32 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRz2s-009yb1-C1 for linux-mtd@lists.infradead.org; Thu, 01 Apr 2021 15:15:44 +0000 Received: by mail-pf1-x42a.google.com with SMTP id l123so179107pfl.8 for ; Thu, 01 Apr 2021 08:15:41 -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=tF+Bf0zSHiNRZEzbvax45HKx5XasDVc4mTeR8Z3f5KOhpxLF17YeyipN6Mnk2MEho2 dIy2iXo7LwjVg0CYNSwMxpVJMpz0INw6mgFNFWDKvTcXRhEiv6IaE/tgrRyuLuuHakLr 9mxUK0wM+O4SVQOusVcdbIoRK689kFxwmzBSTqZmkR6XL0O/dqF0j9iga4Xh67Vj2s86 /xsy6fLZg+0LuawDYPkxWkh0BiCSHlUhcKuW82dbBmgjOMHhjPChWXn9q7xh49G6l+ch aDHeoIzlmBCObxHRlsK5dxeeV4nlRtEdxcC60DDZc+FRNUAy4Bh1U67sZnjTAGYQ7YQ3 z4dw== 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=YACRVKSpGp6a2eWTjlE2GHLAv4mcWaP4W+rvBaHUDvJA5vz6ctZ3YJM/Y8MEf4vuCZ YFMBYwkri9vGf/11bXGwdijJ+Bar1NEnOawzpZuPajTyZfPLmv+NGw+vJp5VRWhhwIqd NY5pFM75LVOJHBLquaObR0b+5Fbl+qQgNdzXAJdljt7Trh7ejavFx+qrxLFOPEYMvdXJ TI4o1FISPv35qZf38a31oWNBPctPQsi1k0lUfT8XxK08RA+EooCUm9SDPTGKNUGh9e39 8XrzdEuuodB1OIWcw4Xhvlf6jjpBPOG3V5uAMyXiMpKRaxH/KcPSGkcjUAv+Y7uVBXGa bfTg== X-Gm-Message-State: AOAM532NkMNnhGnITDdI5EL7Z6tcXPHvc243Gy0IQSXPIWPG2ruERUzm uhLmCPU+PMRx3f4HV6SMjuiY X-Received: by 2002:a62:27c7:0:b029:204:7b11:3222 with SMTP id n190-20020a6227c70000b02902047b113222mr7788418pfn.34.1617290140491; Thu, 01 Apr 2021 08:15:40 -0700 (PDT) Received: from localhost.localdomain ([103.77.37.138]) by smtp.gmail.com with ESMTPSA id 35sm5652769pgr.14.2021.04.01.08.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 08:15:40 -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 v9 4/4] mtd: rawnand: qcom: Add missing nand_cleanup() in error path Date: Thu, 1 Apr 2021 20:45:08 +0530 Message-Id: <20210401151508.143075-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210401151508.143075-1-manivannan.sadhasivam@linaro.org> References: <20210401151508.143075-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210401_161542_464750_B57947B3 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 3.4 (+++) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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(+) Content analysis details: (3.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [103.77.37.138 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42a listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ 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; } }