From patchwork Mon Apr 5 05:09:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 415281 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3393067jai; Sun, 4 Apr 2021 22:10:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzxC1FEwQBOoUedB4/b46QnuCucAzPdCiaX0JYYfkv1Ax0mR+lJIop0c9LLW0P3B4+ud4v X-Received: by 2002:a17:907:3da3:: with SMTP id he35mr26229881ejc.148.1617599403653; Sun, 04 Apr 2021 22:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617599403; cv=none; d=google.com; s=arc-20160816; b=0VTyJ7Cs50LUc/Rr6mikeLrJ8N89WBfwEjCqy8YBPyNqCkWMa+7eKrEHY0CzwpY/jL 3dUIPq6cZeLO2RW4VOS4k3PG3YVFoSUKGxLH9GlLN2dxL3Xr8gXPajtT/9uoE67SCcQG byOET7uXuu4LvNEy13OuiXTLQBZHNF/SKjpXZsYCIvpobNwAIgrCQqaPpHambEbaGKiQ txbl/2h0Wkrk9FrqBtNSqTdfkyK25kNOblrVE9w44ns5f88tp72pw/dBqGEHVuTLjsHl IupnobwnZmHPMKzKTpjNWhhe+FcR8F2jMxMFhmvho7U6Fq7Lykd/l68QvxkUAooNRaEP J55Q== 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=EIOSM+Jlbj62eZAoiGqrvJyU1MmccRrVFUma1qyaw8A=; b=pb4h5cqrf2Y4xAbDB+f5Ra2SHlNQEuuaf7R55U3ampOP2J8ZX2v5UEXdbghyFlpjB5 pqeSD3wwLNB82MMeKNEnUaj4aBySiO0u66Ot3gcXlk976YNDOXcKk02l+oQZnTIwGzeO vkQKKyPiQta2hE5h1XSdx/MR6YvO7qPiRtujwiaGzwEOwghK31ixf7szR3mLYjT00ZIv LYLtJs/VpnufFH6X2eO3Roa/fdnkQCwmXKNLD+ACp+l4a2CZ8xPAUslWZuscrgXODNty udrFMAttMEg2fhftCfgBqUaBPZqEO9QRy8ENnIuVoiJwQLdu1bDH7AM00Ch3O/KZpLF0 8KJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mt6OhMv8; 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 fx8si12454724ejb.481.2021.04.04.22.10.02; Sun, 04 Apr 2021 22:10:03 -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=mt6OhMv8; 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 S231932AbhDEFKA (ORCPT + 6 others); Mon, 5 Apr 2021 01:10:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229867AbhDEFJ6 (ORCPT ); Mon, 5 Apr 2021 01:09:58 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB829C0613E6 for ; Sun, 4 Apr 2021 22:09:52 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id h3so2671921pfr.12 for ; Sun, 04 Apr 2021 22:09:52 -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:mime-version :content-transfer-encoding; bh=EIOSM+Jlbj62eZAoiGqrvJyU1MmccRrVFUma1qyaw8A=; b=mt6OhMv8kLzSjri6/NAOyuml+dUtvpeBUmRGr115w3EiQwMPw1+rzvSZJa6vPj4Xuk Mft/uQJYZgeh4vkuBMUK2n/lFOYt1a/V1kD3Dm0H9jxGYl2nLPhqbMU2zWNKXLe6wzyf UmUN7c0tZeXRto4IwnPde/3baIm6PwOpSj9hK3FmlisOvGGM8orMdOg8cdOFkDucephT H+pei0x0PH7Vpyxvol6JZJMmLXj3P2Q72+AVxhoQ6DXZje4pXgGuquh5PjT1HA2geod1 YhjtY56m3RLnPRJlvQlUFo2N9kXm86npNNes233Pe6wu5bQ5z1RQeUgPkIldEwm5LfhP RLng== 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:mime-version :content-transfer-encoding; bh=EIOSM+Jlbj62eZAoiGqrvJyU1MmccRrVFUma1qyaw8A=; b=nsRnSPQPtSEVJCr+lODH+3HAJdLCZ8aqsvBdxkJ9vKz87UNVwoPxgBdXEgay4suXZp j9QQhrCS9tq0ro0Do6tXK82ylWyh47whXTxMhQ7+aUMr6m8jvhoLIAt4+2rABXGo1t6J dNB82YFXgyGvPNMH2WmYhz/lzPPlAkmGsqkCvH4stXTIbZWHiZ9UJINvobH5nGvkv9LA BC8Wo6IBlnIq+UTqcBao0d15eb/hC0lV0n/TpvhZhT1E0nM5s9uh0zhoXNPgvtizytOu cqYBXg7r9R6hYVkXcwWE2u48sYpN6aIIzB9AR8wagUfJLQxBxp5BgjNmD0FXkMPJzVjp t6iA== X-Gm-Message-State: AOAM5325LY10gluIu9B6Z3RcL/qdYLZ0zsp399upFo8xNApJUVHFxFnX isdJ3yDVIOUbwE7h6vfhO+us X-Received: by 2002:a63:1921:: with SMTP id z33mr21738430pgl.211.1617599392121; Sun, 04 Apr 2021 22:09:52 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:98:8118:aa47:7491:f04a:71ea]) by smtp.gmail.com with ESMTPSA id b126sm14177939pga.91.2021.04.04.22.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Apr 2021 22:09:51 -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] mtd: rawnand: qcom: Use dma_mapping_error() for error check Date: Mon, 5 Apr 2021 10:39:12 +0530 Message-Id: <20210405050912.115591-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org dma_mapping_error() should be used for checking the error value of dma_map_resource() API. Signed-off-by: Manivannan Sadhasivam --- drivers/mtd/nand/raw/qcom_nandc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index fe74cf3aece5..07b3c156a802 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2990,7 +2990,7 @@ static int qcom_nandc_probe(struct platform_device *pdev) nandc->base_dma = dma_map_resource(dev, res->start, resource_size(res), DMA_BIDIRECTIONAL, 0); - if (!nandc->base_dma) + if (dma_mapping_error(dev, nandc->base_dma)) return -ENXIO; ret = qcom_nandc_alloc(nandc);