]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344024:
authorDavid Bright <dab@FreeBSD.org>
Wed, 20 Feb 2019 22:48:38 +0000 (22:48 +0000)
committerDavid Bright <dab@FreeBSD.org>
Wed, 20 Feb 2019 22:48:38 +0000 (22:48 +0000)
commit4d57565d815205c431a8d025099ff3eb2658feee
tree125a85a2c30328716b97fc70ba34b73642e4f520
parent6d95d4c1a0be41c2df7487126fa03a43ba20b694
MFC r344024:

CID 1009492: Logically dead code in sys/cam/scsi/scsi_xpt.c

In `probedone()`, for the `PROBE_REPORT_LUNS` case, all paths that
fall to the bottom of the case set `lp` to `NULL`, so the test for a
non-NULL value of `lp` and call to `free()` if true is dead code as
the test can never be true. Fix by eliminating the whole if
statement. To guard against a possible future change that accidentally
violates this assumption, use a `KASSERT()` to catch if `lp` is
non-NULL.

Sponsored by: Dell EMC Isilon
sys/cam/scsi/scsi_xpt.c