]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
atmel: potential underflow in atmel_set_freq()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 10 May 2016 19:21:17 +0000 (22:21 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 11 May 2016 19:02:20 +0000 (22:02 +0300)
commitd9739a26fbcaa11c026dd79bc310af96003f20d8
tree115bc6a901896eae3e846dfd3728c032d2956992
parent03ba4a1b718e3a018f38f1ee030de4cd052bb3f3
atmel: potential underflow in atmel_set_freq()

Smatch complains that we cap the upper bound of "fwrq->m" but not the
lower bound.  I don't know if it can actually happen but it's simple
enough to check for negatives.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/atmel/atmel.c