staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluate...
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sat, 14 Jun 2014 22:56:32 +0000 (00:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2014 00:16:04 +0000 (17:16 -0700)
Unsigned variable can't be negative so it is unnecessary to test it.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ced1401/userspace/use1401.c

index 7b8a222..9ebddbd 100644 (file)
@@ -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
                     {