summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_freebsd.c
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2010-06-02 23:31:27 +0000
committermjacob <mjacob@FreeBSD.org>2010-06-02 23:31:27 +0000
commit279a3628f7216931b771ca3dc76a61711fa0667d (patch)
treee66138154f0f6318e048fa74b79db26b2ecf2399 /sys/dev/isp/isp_freebsd.c
parent2cbb8fd14a4fd3f29dfa771b02f7eb82cb95d577 (diff)
downloadFreeBSD-src-279a3628f7216931b771ca3dc76a61711fa0667d.zip
FreeBSD-src-279a3628f7216931b771ca3dc76a61711fa0667d.tar.gz
Various minor and not so minor fixes suggested by Coverity.
In at least one case, it's amazing that target mode worked at all. Found by: Coverity. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/isp/isp_freebsd.c')
-rw-r--r--sys/dev/isp/isp_freebsd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 3d84b93..eaeda55 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -284,7 +284,7 @@ isp_detach(ispsoftc_t *isp)
config_intrhook_disestablish(&isp->isp_osinfo.ehook);
isp->isp_osinfo.ehook_active = 0;
}
- if (isp->isp_osinfo.devq == NULL) {
+ if (isp->isp_osinfo.devq != NULL) {
cam_simq_free(isp->isp_osinfo.devq);
isp->isp_osinfo.devq = NULL;
}
@@ -1910,7 +1910,7 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
tstate_t *tptr;
struct ccb_accept_tio *atiop;
uint16_t nphdl;
- atio_private_data_t *atp = NULL;
+ atio_private_data_t *atp;
inot_private_data_t *ntp;
/*
@@ -2063,9 +2063,6 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
rls_lun_statep(isp, tptr);
return;
noresrc:
- if (atp) {
- isp_put_atpd(isp, tptr, atp);
- }
ntp = isp_get_ntpd(isp, tptr);
if (ntp == NULL) {
rls_lun_statep(isp, tptr);
@@ -2500,7 +2497,7 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
lun = inp->in_lun;
}
if (ISP_CAP_2KLOGIN(isp)) {
- loopid = ((in_fcentry_e_t *)inot)->in_iid;
+ loopid = ((in_fcentry_e_t *)inp)->in_iid;
} else {
loopid = inp->in_iid;
}
OpenPOWER on IntegriCloud