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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Jun 2015 06:19:57 +0000 (23:19 -0700)
commita72719d75d8e30203d8624465215072b74be30e7
tree15707f8b4180d84d5e73dfc6f411ca18d343f9db
parentc8f30d37ddc0800e6fcbda887c739f08654bef13
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/atmel-mci.c