Skip to content
Commit d9e1f441 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Wolfram Sang
Browse files

i2c: davinci: fixup wait_for_completion_timeout handling



wait_for_completion_timeout return 0 (timeout) or >=1 (completion) so the check
for >= 0 is always true and can be dropped implying that r==-EREMOTEIO and thus
the return of -EREMOTEIO can be done in the   if (dev->buf_len)  branch.
As wait_for_completion_timeout returns unsigned long not int, and   int r   is
exclusively used for wait_for_completion_timeout it is renamed and the type
changed to unsigned long.

Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarAlexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 9c836d0c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment