All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH] staging: rts5208: remove always true comparison
Date: Thu, 14 May 2015 19:55:59 +0530	[thread overview]
Message-ID: <1431613559-17097-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)

the if comparison is always true as anything bitwise and-ing with 0x1E
can never be equal to 0x03.

Fixes bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69881

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/rts5208/sd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index a8d657b..2e3f1f4 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -4170,10 +4170,8 @@ RTY_SEND_CMD:
 				}
 
 			} else if (rsp_type == SD_RSP_TYPE_R0) {
-				if ((ptr[3] & 0x1E) != 0x03) {
-					rtsx_trace(chip);
-					return STATUS_FAIL;
-				}
+				rtsx_trace(chip);
+				return STATUS_FAIL;
 			}
 		}
 	}
-- 
1.8.1.2


             reply	other threads:[~2015-05-14 14:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 14:25 Sudip Mukherjee [this message]
2015-05-14 15:18 ` [PATCH] staging: rts5208: remove always true comparison Dan Carpenter
2015-05-15 10:16   ` Sudip Mukherjee
2015-05-25 16:22     ` Dan Carpenter
2015-05-26  4:55       ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431613559-17097-1-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.