svn commit: r299272 - head/sys/dev/mpr
Stephen McConnell
slm at FreeBSD.org
Mon May 9 16:34:08 UTC 2016
Author: slm
Date: Mon May 9 16:34:06 2016
New Revision: 299272
URL: https://svnweb.freebsd.org/changeset/base/299272
Log:
done_ccb pointer can be used if it is NULL.
To prevent this, move check for done_ccb == NULL to before done_ccb is used in
mprsas_stop_unit_done().
Reviewed by: ken, scottl, ambrisko, asomers
Approved by: ken, scottl, ambrisko
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6099
Modified:
head/sys/dev/mpr/mpr_sas_lsi.c
Modified: head/sys/dev/mpr/mpr_sas_lsi.c
==============================================================================
--- head/sys/dev/mpr/mpr_sas_lsi.c Mon May 9 16:31:43 2016 (r299271)
+++ head/sys/dev/mpr/mpr_sas_lsi.c Mon May 9 16:34:06 2016 (r299272)
@@ -1272,15 +1272,15 @@ mprsas_stop_unit_done(struct cam_periph
struct mprsas_softc *sassc;
char path_str[64];
+ if (done_ccb == NULL)
+ return;
+
sassc = (struct mprsas_softc *)done_ccb->ccb_h.ppriv_ptr1;
xpt_path_string(done_ccb->ccb_h.path, path_str, sizeof(path_str));
mpr_dprint(sassc->sc, MPR_INFO, "Completing stop unit for %s\n",
path_str);
- if (done_ccb == NULL)
- return;
-
/*
* Nothing more to do except free the CCB and path. If the command
* timed out, an abort reset, then target reset will be issued during
More information about the svn-src-all
mailing list