Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 16:03:00 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241952 - head/sys/cam/scsi
Message-ID:  <201210231603.q9NG30DL004951@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Oct 23 16:03:00 2012
New Revision: 241952
URL: http://svn.freebsd.org/changeset/base/241952

Log:
  Remove two more 'periph == NULL' checks missed in r241404.
  This condition can never be true as functions are called from single place
  and the checks just pollute the code and confuse Clang Static Analyzer.

Modified:
  head/sys/cam/scsi/scsi_enc.c
  head/sys/cam/scsi/scsi_pt.c

Modified: head/sys/cam/scsi/scsi_enc.c
==============================================================================
--- head/sys/cam/scsi/scsi_enc.c	Tue Oct 23 15:48:42 2012	(r241951)
+++ head/sys/cam/scsi/scsi_enc.c	Tue Oct 23 16:03:00 2012	(r241952)
@@ -879,11 +879,6 @@ enc_ctor(struct cam_periph *periph, void
 	char *tname;
 
 	cgd = (struct ccb_getdev *)arg;
-	if (periph == NULL) {
-		printf("enc_ctor: periph was NULL!!\n");
-		goto out;
-	}
-
 	if (cgd == NULL) {
 		printf("enc_ctor: no getdev CCB, can't register device\n");
 		goto out;

Modified: head/sys/cam/scsi/scsi_pt.c
==============================================================================
--- head/sys/cam/scsi/scsi_pt.c	Tue Oct 23 15:48:42 2012	(r241951)
+++ head/sys/cam/scsi/scsi_pt.c	Tue Oct 23 16:03:00 2012	(r241952)
@@ -255,11 +255,6 @@ ptctor(struct cam_periph *periph, void *
 	struct ccb_pathinq cpi;
 
 	cgd = (struct ccb_getdev *)arg;
-	if (periph == NULL) {
-		printf("ptregister: periph was NULL!!\n");
-		return(CAM_REQ_CMP_ERR);
-	}
-
 	if (cgd == NULL) {
 		printf("ptregister: no getdev CCB, can't register device\n");
 		return(CAM_REQ_CMP_ERR);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210231603.q9NG30DL004951>