OSDN Git Service

staging: bcm2835-camera: fix timeout handling in wait_for_completion_timeout
authorNicholas Mc Guire <hofrat@osadl.org>
Sat, 21 Jul 2018 13:20:28 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:26 +0000 (08:39 +0200)
commit3360648a723d1b25d41d02310cc87734f42602b6
treea7b6c86c382a785d74c9022d0e1b48e12e396fa5
parentacd8e75056b84d217a35ed1a135a0ad35ac68e3a
staging: bcm2835-camera: fix timeout handling in wait_for_completion_timeout

[ Upstream commit b7afce51d95726a619743aaad8870db66dfa1479 ]

wait_for_completion_timeout returns unsigned long not int so a variable of
proper type is introduced. Further the check for <= 0 is ambiguous and should
be == 0 here indicating timeout which is the only error case so no additional
check needed here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c