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 7b8a2227fe5b69677d586def6198cd02a075fff0..9ebddbd07e8df2c49f0ccc860d4f3dd8de431dc4 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
                     {