summaryrefslogtreecommitdiffstats
path: root/sys/cam/ata
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-10-10 18:10:11 +0000
committermav <mav@FreeBSD.org>2012-10-10 18:10:11 +0000
commit35f2c3dc00c1aac971529a7b75103cb3f83c99b2 (patch)
treeb78cddcfc1cea9fc19c68441d5a183a73e789242 /sys/cam/ata
parentff4e573db66b9029ee9511d02936b28007c14675 (diff)
downloadFreeBSD-src-35f2c3dc00c1aac971529a7b75103cb3f83c99b2.zip
FreeBSD-src-35f2c3dc00c1aac971529a7b75103cb3f83c99b2.tar.gz
Remove 'periph == NULL' check from bunch of periph drivers.
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.
Diffstat (limited to 'sys/cam/ata')
-rw-r--r--sys/cam/ata/ata_da.c5
-rw-r--r--sys/cam/ata/ata_pmp.c5
-rw-r--r--sys/cam/ata/ata_xpt.c5
3 files changed, 0 insertions, 15 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 92ed0c6..bb63ac8 100644
--- a/sys/cam/ata/ata_da.c
+++ b/sys/cam/ata/ata_da.c
@@ -943,11 +943,6 @@ adaregister(struct cam_periph *periph, void *arg)
int legacy_id, quirks;
cgd = (struct ccb_getdev *)arg;
- if (periph == NULL) {
- printf("adaregister: periph was NULL!!\n");
- return(CAM_REQ_CMP_ERR);
- }
-
if (cgd == NULL) {
printf("adaregister: no getdev CCB, can't register device\n");
return(CAM_REQ_CMP_ERR);
diff --git a/sys/cam/ata/ata_pmp.c b/sys/cam/ata/ata_pmp.c
index db67148..b2acdee 100644
--- a/sys/cam/ata/ata_pmp.c
+++ b/sys/cam/ata/ata_pmp.c
@@ -367,11 +367,6 @@ pmpregister(struct cam_periph *periph, void *arg)
struct ccb_getdev *cgd;
cgd = (struct ccb_getdev *)arg;
- if (periph == NULL) {
- printf("pmpregister: periph was NULL!!\n");
- return(CAM_REQ_CMP_ERR);
- }
-
if (cgd == NULL) {
printf("pmpregister: no getdev CCB, can't register device\n");
return(CAM_REQ_CMP_ERR);
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 91f985d..eb1a0b6 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -224,11 +224,6 @@ proberegister(struct cam_periph *periph, void *arg)
probe_softc *softc;
request_ccb = (union ccb *)arg;
- if (periph == NULL) {
- printf("proberegister: periph was NULL!!\n");
- return(CAM_REQ_CMP_ERR);
- }
-
if (request_ccb == NULL) {
printf("proberegister: no probe CCB, "
"can't register device\n");
OpenPOWER on IntegriCloud