]> git.itanic.dy.fi Git - linux-stable/commit
mmc: atmel-mci: fix bad variable type for clkdiv
authorLudovic Desroches <ludovic.desroches@atmel.com>
Wed, 6 May 2015 13:16:46 +0000 (15:16 +0200)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:41 +0000 (09:20 +0800)
commitcc81c42b3fe5cac84f025715260d9bff305e9968
treeffa6b9484b3d8f2c70fa1dfeb2da6e9b8916dd8e
parentf126db0e684121668bc0ff4889dccd8f25a333b5
mmc: atmel-mci: fix bad variable type for clkdiv

commit 60c8f783a18feb95ad967c87e9660caf09fb4700 upstream.

clkdiv is declared as an u32 but it can be set to a negative value
causing a huge divisor value. Change its type to int to avoid this case.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/mmc/host/atmel-mci.c