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.
This commit is contained in:
parent
500cbe13db
commit
aa2a1aaf90
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -692,10 +692,6 @@ cdregister(struct cam_periph *periph, void *arg)
|
||||
caddr_t match;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("cdregister: periph was NULL!!\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
}
|
||||
if (cgd == NULL) {
|
||||
printf("cdregister: no getdev CCB, can't register device\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
|
@ -324,11 +324,6 @@ chregister(struct cam_periph *periph, void *arg)
|
||||
struct ccb_pathinq cpi;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("chregister: periph was NULL!!\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
}
|
||||
|
||||
if (cgd == NULL) {
|
||||
printf("chregister: no getdev CCB, can't register device\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
|
@ -1583,11 +1583,6 @@ daregister(struct cam_periph *periph, void *arg)
|
||||
caddr_t match;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("daregister: periph was NULL!!\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
}
|
||||
|
||||
if (cgd == NULL) {
|
||||
printf("daregister: no getdev CCB, can't register device\n");
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
|
@ -312,11 +312,6 @@ passregister(struct cam_periph *periph, void *arg)
|
||||
int no_tags;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("%s: periph was NULL!!\n", __func__);
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
}
|
||||
|
||||
if (cgd == NULL) {
|
||||
printf("%s: no getdev CCB, can't register device\n", __func__);
|
||||
return(CAM_REQ_CMP_ERR);
|
||||
|
@ -1445,11 +1445,6 @@ saregister(struct cam_periph *periph, void *arg)
|
||||
int i;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("saregister: periph was NULL!!\n");
|
||||
return (CAM_REQ_CMP_ERR);
|
||||
}
|
||||
|
||||
if (cgd == NULL) {
|
||||
printf("saregister: no getdev CCB, can't register device\n");
|
||||
return (CAM_REQ_CMP_ERR);
|
||||
|
@ -261,11 +261,6 @@ sgregister(struct cam_periph *periph, void *arg)
|
||||
int no_tags;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (periph == NULL) {
|
||||
printf("sgregister: periph was NULL!!\n");
|
||||
return (CAM_REQ_CMP_ERR);
|
||||
}
|
||||
|
||||
if (cgd == NULL) {
|
||||
printf("sgregister: no getdev CCB, can't register device\n");
|
||||
return (CAM_REQ_CMP_ERR);
|
||||
|
@ -615,11 +615,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");
|
||||
|
Loading…
Reference in New Issue
Block a user