[v2] mtd: rawnand: brcmnand: Fix NULL pointer assignment
diff mbox series

Message ID 20191021164555.5330-1-f.fainelli@gmail.com
State Accepted
Headers show
Series
  • [v2] mtd: rawnand: brcmnand: Fix NULL pointer assignment
Related show

Commit Message

Florian Fainelli Oct. 21, 2019, 4:45 p.m. UTC
Sparse complained about the following:

drivers/mtd/nand/raw/brcmnand/brcmnand.c:921:40: warning: Using plain integer as NULL pointer

fix this issue by assigning the pointer to NULL.

Fixes: c1ac2dc34b51 ("mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal Oct. 30, 2019, 8:24 a.m. UTC | #1
On Mon, 2019-10-21 at 16:45:54 UTC, Florian Fainelli wrote:
> Sparse complained about the following:
> 
> drivers/mtd/nand/raw/brcmnand/brcmnand.c:921:40: warning: Using plain integer as NULL pointer
> 
> fix this issue by assigning the pointer to NULL.
> 
> Fixes: c1ac2dc34b51 ("mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

Patch
diff mbox series

diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index 15ef30b368a5..6a7f0211f5a5 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -918,7 +918,7 @@  static inline void disable_ctrl_irqs(struct brcmnand_controller *ctrl)
 		return;
 
 	if (has_flash_dma(ctrl)) {
-		ctrl->flash_dma_base = 0;
+		ctrl->flash_dma_base = NULL;
 		disable_irq(ctrl->dma_irq);
 	}