mtd: nand: sh_flctl: use dma_mapping_error to check map errors
authorPan Bian <bianpan2016@163.com>
Tue, 8 Aug 2017 14:35:42 +0000 (22:35 +0800)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:22 +0000 (16:49 +0200)
commitdbf5f6424ed92131b2d5bf363a0176d8a9f531ef
tree0c6b7f9139b25b7dba3ebcc1a1833de18d884a34
parent892dd1831392adbdf4e55d0c284c3aea6ba4d855
mtd: nand: sh_flctl: use dma_mapping_error to check map errors

The return value of dma_map_single() should be checked by
dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its
return value is checked against NULL, which could result in failures.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/sh_flctl.c