From: Jiri Slaby <jslaby@suse.cz>
To: jirislaby@gmail.com
Cc: linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"David S. Miller" <davem@davemloft.net>,
linux-ide@vger.kernel.org
Subject: [PATCH] IDE: ide-floppy, remove unnecessary NULL check
Date: Sat, 6 Nov 2010 10:06:51 +0100 [thread overview]
Message-ID: <1289034412-24278-3-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1289034412-24278-1-git-send-email-jslaby@suse.cz>
Stanse founf that rq in ide_floppy_callback cannot be NULL, because it
is dereferenced all around. So remove the superfluous check.
This appeared after blk_* macors removal.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-ide@vger.kernel.org
---
drivers/ide/ide-floppy.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 5406b6e..536ff68 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -73,7 +73,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
drive->failed_pc = NULL;
if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 ||
- (rq && rq->cmd_type == REQ_TYPE_BLOCK_PC))
+ rq->cmd_type == REQ_TYPE_BLOCK_PC)
uptodate = 1; /* FIXME */
else if (pc->c[0] == GPCMD_REQUEST_SENSE) {
--
1.7.3.1
next prev parent reply other threads:[~2010-11-06 9:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 9:06 [PATCH] x86: pci/xen, fix memory leak Jiri Slaby
2010-11-06 9:06 ` [PATCH] Char: virtio_console, " Jiri Slaby
2010-11-07 23:28 ` Rusty Russell
2010-11-06 9:06 ` Jiri Slaby [this message]
2010-11-06 12:00 ` [PATCH] IDE: ide-floppy, remove unnecessary NULL check Sergei Shtylyov
2010-11-06 12:10 ` Borislav Petkov
2010-11-22 19:39 ` David Miller
2010-11-06 9:06 ` [PATCH] ocfs2: fix memory leak Jiri Slaby
2010-11-18 23:42 ` Joel Becker
2010-11-08 15:34 ` [PATCH] x86: pci/xen, " Konrad Rzeszutek Wilk
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=1289034412-24278-3-git-send-email-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=jirislaby@gmail.com \
--cc=linux-ide@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®