From: Rickard Strandqvist Date: Sat, 14 Jun 2014 22:56:32 +0000 (+0200) Subject: staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluate... X-Git-Tag: v3.17-rc1~123^2~1699 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b82f412bcf6956d89117d6f561cfb0482371b016;p=karo-tx-linux.git staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluates to true Unsigned variable can't be negative so it is unnecessary to test it. Signed-off-by: Rickard Strandqvist Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ced1401/userspace/use1401.c b/drivers/staging/ced1401/userspace/use1401.c index 7b8a2227fe5b..9ebddbd07e8d 100644 --- a/drivers/staging/ced1401/userspace/use1401.c +++ b/drivers/staging/ced1401/userspace/use1401.c @@ -1744,13 +1744,8 @@ U14API(short) U14GetString(short hand, char* pBuffer, unsigned short wMaxLen) &dwBytes, NULL); if (iOK) /* Device IO control OK ? */ { - if (dwBytes >= 0) /* If driver OK */ - { - strcpy(pBuffer, tstr); - sErr = U14ERR_NOERROR; - } - else - sErr = U14ERR_DRIVCOMMS; + strcpy(pBuffer, tstr); + sErr = U14ERR_NOERROR; } else {