summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian Lütke-Stetzkamp <christian@lkamp.de>2018-04-18 17:27:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 15:37:48 +0200
commitc65f33aaaa67f46bfe1db937c1df05402a500426 (patch)
tree9ffe01343c29342056914b3b69cb3498d5bfae60 /drivers
parente254adf415aa8cd203e0c7a9f99f5bcba08bd100 (diff)
staging: mt7621-mmc: Fix null pointer deref if ext sdio irq enabled
The enable|disable_sdio_irq() fields of msdc_hw are never set, so when they are called, they are null pointer. In case of the MSDC_EXT_SDIO_IRQ flag set in msdc0_hw, this happens. But because these fields are never set, they can simply be removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/mt7621-mmc/board.h4
-rw-r--r--drivers/staging/mt7621-mmc/sd.c4
2 files changed, 0 insertions, 8 deletions
diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h
index e4230770cd33..c4e014d01635 100644
--- a/drivers/staging/mt7621-mmc/board.h
+++ b/drivers/staging/mt7621-mmc/board.h
@@ -68,10 +68,6 @@ struct msdc_hw {
/* external power control for card */
void (*ext_power_on)(void);
void (*ext_power_off)(void);
-
- /* external sdio irq operations */
- void (*enable_sdio_eirq)(void);
- void (*disable_sdio_eirq)(void);
};
extern struct msdc_hw msdc0_hw;
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index d803bfb45693..53866fda6bea 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -2261,10 +2261,6 @@ static void msdc_ops_enable_sdio_irq(struct mmc_host *mmc, int enable)
u32 tmp;
if (hw->flags & MSDC_EXT_SDIO_IRQ) { /* yes for sdio */
- if (enable)
- hw->enable_sdio_eirq(); /* combo_sdio_enable_eirq */
- else
- hw->disable_sdio_eirq(); /* combo_sdio_disable_eirq */
} else {
ERR_MSG("XXX "); /* so never enter here */
tmp = sdr_read32(SDC_CFG);