The segmentation fault is caused when accessing a potential NULL host->data structure.
Signed-off-by: Hugo Villeneuve <[email protected]> --- drivers/mmc/host/davinci_mmc.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index 8ea3902..9f19283 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -430,6 +430,12 @@ static void mmc_davinci_dma_cb(unsigned channel, u16 ch_status, void *data) * request was seen. In the future, TC errors (like bad * addresses) might be presented too. */ + if (!host->data) { + dev_warn(mmc_dev(host->mmc), + "DMA error (host->data is NULL)\n"); + return; + } + dev_warn(mmc_dev(host->mmc), "DMA %s error\n", (host->data->flags & MMC_DATA_WRITE) ? "write" : "read"); -- 1.5.4.5 _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
