mfd: dln2: Add a limit check for invalid echo
authorOctavian Purdila <octavian.purdila@intel.com>
Tue, 18 Nov 2014 12:57:59 +0000 (14:57 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Nov 2014 17:12:50 +0000 (17:12 +0000)
commit00ee7a37fdc3ed9bc6315f8af0270f2df55437d7
tree87189f2932f9c28f0944c4093106d4d31b2e14f3
parent9331642812b19313ca4c545b37c001d68efb7022
mfd: dln2: Add a limit check for invalid echo

The echo field in dln2_transfer_complete comes directly from an USB
transfer and we should not trust it is valid.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/dln2.c