From: Krzysztof Kozlowski <krzk@kernel.org>
To: Kyungmin Park <kyungmin.park@samsung.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
Han Xu <han.xu@nxp.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 4/6] mtd: rawnand: marvell: Simplify with dev_err_probe()
Date: Tue, 1 Sep 2020 16:25:33 +0200 [thread overview]
Message-ID: <20200901142535.12819-4-krzk@kernel.org> (raw)
In-Reply-To: <20200901142535.12819-1-krzk@kernel.org>
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/mtd/nand/raw/marvell_nand.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index 8482d3bd8b1f..52cb7da2fc02 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -2759,10 +2759,7 @@ static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
if (IS_ERR(nfc->dma_chan)) {
ret = PTR_ERR(nfc->dma_chan);
nfc->dma_chan = NULL;
- if (ret != -EPROBE_DEFER)
- dev_err(nfc->dev, "DMA channel request failed: %d\n",
- ret);
- return ret;
+ return dev_err_probe(nfc->dev, ret, "DMA channel request failed\n");
}
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
2.17.1
next prev parent reply other threads:[~2020-09-01 16:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 14:25 [PATCH 1/6] mtd: onenand: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-01 14:25 ` [PATCH 2/6] mtd: rawnand: atmel: " Krzysztof Kozlowski
2020-09-01 19:12 ` Alexandre Belloni
2020-09-11 16:56 ` Miquel Raynal
2020-09-01 14:25 ` [PATCH 3/6] mtd: rawnand: gpmi: " Krzysztof Kozlowski
2020-09-11 16:55 ` Miquel Raynal
2020-09-01 14:25 ` Krzysztof Kozlowski [this message]
2020-09-11 16:55 ` [PATCH 4/6] mtd: rawnand: marvell: " Miquel Raynal
2020-09-01 14:25 ` [PATCH 5/6] mtd: rawnand: marvell: Fix and update kerneldoc Krzysztof Kozlowski
2020-09-11 16:55 ` Miquel Raynal
2020-09-01 14:25 ` [PATCH 6/6] mtd: rawnand: qcom: Simplify with dev_err_probe() Krzysztof Kozlowski
2020-09-11 16:55 ` Miquel Raynal
2020-09-11 16:56 ` [PATCH 1/6] mtd: onenand: " Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200901142535.12819-4-krzk@kernel.org \
--to=krzk@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=han.xu@nxp.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).