From: Dan Carpenter Date: Sun, 8 Jul 2012 01:17:54 +0000 (-0700) Subject: Input: ff-memless - fix a couple min_t() casts X-Git-Tag: v3.6-rc1~95^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a932145f2d57bad1092ba006dee9065adc5eb39;p=pandora-kernel.git Input: ff-memless - fix a couple min_t() casts envelope->attack_level is a u16 type. We're trying to clamp it here so it's between 0 and 0x7fff. Unfortunately, the cast to __s16 turns all the values larger than 0x7fff into negative numbers and min_t() thinks they are less than 0x7fff. envelope_level is an int so now we've got negative values stored there. Signed-off-by: Dan Carpenter Signed-off-by: Dmitry Torokhov --- Reading git-diff-tree failed