From patchwork Sat Nov 6 09:06:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: IDE: ide-floppy, remove unnecessary NULL check Date: Fri, 05 Nov 2010 23:06:51 -0000 From: Jiri Slaby X-Patchwork-Id: 70322 Message-Id: <1289034412-24278-3-git-send-email-jslaby@suse.cz> To: jirislaby@gmail.com Cc: linux-kernel@vger.kernel.org, Christoph Hellwig , "David S. Miller" , linux-ide@vger.kernel.org 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 Cc: Christoph Hellwig Cc: "David S. Miller" 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) {