]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344024:
authordab <dab@FreeBSD.org>
Wed, 20 Feb 2019 22:48:55 +0000 (22:48 +0000)
committerdab <dab@FreeBSD.org>
Wed, 20 Feb 2019 22:48:55 +0000 (22:48 +0000)
commitee8cd6f5547cf4381d536d29818c5cda03a701b0
tree86122795934b7757303a7661aad181cd06aa196b
parent69acb956c7257e0f071ac659568f33042d11dd82
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