aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/ecc-realtek.c
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-12-01 11:31:10 +0000
committersaturneric <[email protected]>2025-12-01 11:31:10 +0000
commitfa2a26ee8b4693d3733a7d58863cb38cb0e8680e (patch)
tree01f99691b8e34c516e435932f1353ad673bedf2e /drivers/mtd/nand/ecc-realtek.c
parentfix(driver): sync specific drivers from rpi upstream (diff)
parentLinux 6.18 (diff)
downloadkernel-main.tar.gz
kernel-main.zip
Merge tag 'v6.18' into linux-6.18.yHEADmainlinux-6.18.y
Linux 6.18
Diffstat (limited to 'drivers/mtd/nand/ecc-realtek.c')
-rw-r--r--drivers/mtd/nand/ecc-realtek.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/ecc-realtek.c b/drivers/mtd/nand/ecc-realtek.c
index 7d718934c909..0046da37ea3e 100644
--- a/drivers/mtd/nand/ecc-realtek.c
+++ b/drivers/mtd/nand/ecc-realtek.c
@@ -380,7 +380,7 @@ static void rtl_ecc_cleanup_ctx(struct nand_device *nand)
nand_ecc_cleanup_req_tweaking(&ctx->req_ctx);
}
-static struct nand_ecc_engine_ops rtl_ecc_engine_ops = {
+static const struct nand_ecc_engine_ops rtl_ecc_engine_ops = {
.init_ctx = rtl_ecc_init_ctx,
.cleanup_ctx = rtl_ecc_cleanup_ctx,
.prepare_io_req = rtl_ecc_prepare_io_req,
@@ -418,8 +418,8 @@ static int rtl_ecc_probe(struct platform_device *pdev)
rtlc->buf = dma_alloc_noncoherent(dev, RTL_ECC_DMA_SIZE, &rtlc->buf_dma,
DMA_BIDIRECTIONAL, GFP_KERNEL);
- if (IS_ERR(rtlc->buf))
- return PTR_ERR(rtlc->buf);
+ if (!rtlc->buf)
+ return -ENOMEM;
rtlc->dev = dev;
rtlc->engine.dev = dev;