]> git.itanic.dy.fi Git - linux-stable/commit
p54: clamp properly instead of just truncating
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Jan 2014 19:05:23 +0000 (22:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Mar 2014 16:58:13 +0000 (09:58 -0700)
commitd30a14a3f02d6d3aa51f429305c53905317bb4a7
treece421469e013b8d4e8fd1c43b8b0e91bb74566ec
parent573994d38b1c10e72cfa55fe6b02d8217a6166ff
p54: clamp properly instead of just truncating

commit 608cfbe4abaf76e9d732efd7ed1cfa3998163d91 upstream.

The call to clamp_t() first truncates the variable signed 8 bit and as a
result, the actual clamp is a no-op.

Fixes: 0d78156eef1d ('p54: improve site survey')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/p54/txrx.c