]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: ks7010: fix wait_for_completion_interruptible_timeout return handling
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 25 Jul 2016 19:21:50 +0000 (21:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 11:02:11 +0000 (05:02 -0600)
commit2fe3e8e7be4ff9514b8d19d525ba04712cbfa873
treece8f8573a837ffcea7529c5f94716df8fd00ddd1
parent7da89c6a1db629d723ff5c20b95a3709070cbc9c
staging: ks7010: fix wait_for_completion_interruptible_timeout return handling

commit 9d29f14db1095f52ca00b8162b242d6fce07d19f upstream.

wait_for_completion_interruptible_timeout return 0 on timeout and
-ERESTARTSYS if interrupted. The check for
!wait_for_completion_interruptible_timeout() would report an interrupt
as timeout. Further, while HZ/50 will work most of the time it could
fail for HZ < 50, so this is switched to msecs_to_jiffies(20).

Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c