Re: [PATCH 3/3] mtd: nand: add NAND driver for Broadcom STB NAND controller

From: Florian Fainelli
Date: Mon Mar 16 2015 - 15:59:11 EST


[snip]

> +static int brcmnand_dma_trans(struct brcmnand_host *host, u64 addr, u32 *buf,
> + u32 len, u8 dma_cmd)
> +{
> + struct brcmnand_controller *ctrl = host->ctrl;
> + dma_addr_t buf_pa;
> + int dir = dma_cmd == CMD_PAGE_READ ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
> +
> + buf_pa = dma_map_single(ctrl->dev, buf, len, dir);

We are missing a dma_mapping_error() check here.
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/