All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: dgilbert@interlog.com
Subject: [Patch] remove unnessecairy check in drivers/scsi/sg.c
Date: Mon, 25 Sep 2006 00:51:57 +0200	[thread overview]
Message-ID: <1159138317.9062.9.camel@alice> (raw)

hi,

coverity spotted this (cid #758). All callers dereference sfp,
so we dont need this check. In addition to this, we dereference
it earlier in the function.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.18-git3/drivers/scsi/sg.c.orig	2006-09-24 22:11:36.000000000 +0200
+++ linux-2.6.18-git3/drivers/scsi/sg.c	2006-09-24 22:12:14.000000000 +0200
@@ -1828,7 +1828,7 @@ sg_build_indirect(Sg_scatter_hold * schp
 	int blk_size = buff_size;
 	struct page *p = NULL;
 
-	if ((blk_size < 0) || (!sfp))
+	if (blk_size < 0)
 		return -EFAULT;
 	if (0 == blk_size)
 		++blk_size;	/* don't know why */



                 reply	other threads:[~2006-09-24 22:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1159138317.9062.9.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=dgilbert@interlog.com \
    --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.