[PATCH] mtd: onenand: Pass correct pointer to IRQ handler

Dan Carpenter posted 1 patch 3 months, 1 week ago
drivers/mtd/nand/onenand/onenand_samsung.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] mtd: onenand: Pass correct pointer to IRQ handler
Posted by Dan Carpenter 3 months, 1 week ago
This was supposed to pass "onenand" instead of "&onenand" with the
ampersand.  Passing a random stack address which will be gone when the
function ends makes no sense.  However the good thing is that the pointer
is never used, so this doesn't cause a problem at run time.

Fixes: e23abf4b7743 ("mtd: OneNAND: S5PC110: Implement DMA interrupt method")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/mtd/nand/onenand/onenand_samsung.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/onenand/onenand_samsung.c b/drivers/mtd/nand/onenand/onenand_samsung.c
index f37a6138e461..6d6aa709a21f 100644
--- a/drivers/mtd/nand/onenand/onenand_samsung.c
+++ b/drivers/mtd/nand/onenand/onenand_samsung.c
@@ -906,7 +906,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
 			err = devm_request_irq(&pdev->dev, r->start,
 					       s5pc110_onenand_irq,
 					       IRQF_SHARED, "onenand",
-					       &onenand);
+					       onenand);
 			if (err) {
 				dev_err(&pdev->dev, "failed to get irq\n");
 				return err;
-- 
2.51.0
Re: [PATCH] mtd: onenand: Pass correct pointer to IRQ handler
Posted by Miquel Raynal 3 months ago
On Sat, 01 Nov 2025 16:25:48 +0300, Dan Carpenter wrote:
> This was supposed to pass "onenand" instead of "&onenand" with the
> ampersand.  Passing a random stack address which will be gone when the
> function ends makes no sense.  However the good thing is that the pointer
> is never used, so this doesn't cause a problem at run time.
> 
> 

Applied to mtd/fixes, thanks!

[1/1] mtd: onenand: Pass correct pointer to IRQ handler
      commit: 97315e7c901a1de60e8ca9b11e0e96d0f9253e18

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl