Re: [PATCH] Input: max77693-haptic - fix potential overflow

2014-10-28 Thread Chanwoo Choi
On 10/29/2014 01:43 AM, Dmitry Torokhov wrote: > Expression haptic->pwm_dev->period * haptic->magnitude is of type 'unsigned > int' and may overflow. We need to convert one of the operands to u64 before > multiplying, instead of casting result (potentially overflown) to u64. > > Reported by Coveri

Re: [PATCH] Input: max77693-haptic - fix potential overflow

2014-10-28 Thread Jaewon Kim
Hi Dmitry, 2014년 10월 29일 01:43에 Dmitry Torokhov 이(가) 쓴 글: Expression haptic->pwm_dev->period * haptic->magnitude is of type 'unsigned int' and may overflow. We need to convert one of the operands to u64 before multiplying, instead of casting result (potentially overflown) to u64. Reported by Co

[PATCH] Input: max77693-haptic - fix potential overflow

2014-10-28 Thread Dmitry Torokhov
Expression haptic->pwm_dev->period * haptic->magnitude is of type 'unsigned int' and may overflow. We need to convert one of the operands to u64 before multiplying, instead of casting result (potentially overflown) to u64. Reported by Coverity: CID 1248753 Signed-off-by: Dmitry Torokhov --- dri