]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: tmio-mmc: fix bad pointer math
authorChris Brandt <chris.brandt@renesas.com>
Wed, 12 Jul 2017 15:40:01 +0000 (08:40 -0700)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 13 Jul 2017 09:56:35 +0000 (11:56 +0200)
commit75e4164ab65445d5fc8536e47f6a994439e682b0
tree2b89b0b7b752949be7c3c6347beb1541cc8947c8
parentbef24c0bba95d17cd12c39f3f98be701450bd3f3
mmc: tmio-mmc: fix bad pointer math

The existing code gives an incorrect pointer value.
The buffer pointer 'buf' was of type unsigned short *, and 'count' was a
number in bytes. A cast of buf should have been used.

However, instead of casting, just change the code to use u32 pointers.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 9b21f7f1057a: ("mmc: tmio-mmc: add support for 32bit data port")
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc_core.c