]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: fix division by zero in MMC core
authorLinus Walleij <linus.walleij@stericsson.com>
Tue, 4 Jan 2011 23:44:32 +0000 (00:44 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 9 Jan 2011 04:52:33 +0000 (23:52 -0500)
commit8f8e1955d1394ea1a6065b0c0b930a9cceb36d81
treec950489d3f41063fc0acc4b259ce4d4bae676d12
parent1c5a792b4f23bb1efdcd6a5dc1a58ba268391894
mmc: fix division by zero in MMC core

The card is not always clocked and the clock frequency zero is perfectly
legal, thus this code in mmc_set_data_timeout() may cause a division by
zero. It will be triggered more often if you're using software clock
gating but can be triggered under other conditions too.

Reported-by: Pierre Tardy <tardyp@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c