OSDN Git Service

staging: comedi: dt2801: change function return type to void
authorChase Southwood <chase.southwood@gmail.com>
Mon, 18 Aug 2014 03:43:02 +0000 (22:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:16:19 +0000 (13:16 -0700)
commitadb7a4777b47f23fdc67a02b195f3ad4b61946ff
tree33ac37ca526915be8ae27f44ec670f5e06f89482
parentcb3f491d3195510af1c79c37a01076b4408a2e3c
staging: comedi: dt2801: change function return type to void

cppcheck was complaining that the variable 'stat' is being reassigned
before the old value is used.  Upon inspection, I found that
dt2801_writecmd() cannot fail, always returns 0, and most callers already
do not bother with assigning its return value anyway, so it makes sense to
just change the return type for this function from int to void, and remove
the two assignments to 'stat'.

Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt2801.c