[PATCH] staging: ced1401: userspace: use1401.c: Cleaning up if statement that always evaluates to true

From: Rickard Strandqvist
Date: Sat Jun 14 2014 - 18:55:50 EST


Unsigned variable can't be negative so it is unnecessary to test it.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/ced1401/userspace/use1401.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/ced1401/userspace/use1401.c b/drivers/staging/ced1401/userspace/use1401.c
index 7b8a222..9ebddbd 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
{
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/