HomeFreeBSD

cam_sim: harmonize code related to acquiring a mtx

Description

cam_sim: harmonize code related to acquiring a mtx

cam_sim_free(), cam_sim_release(), and cam_sim_hold() all assign
a mtx variable during declaration and then if NULL or the mtx is
held may re-asign the variable and/or acquire/release a lock.

Harmonize the code, avoiding double assignments and make it look
the same for all three function (with cam_sim_free() not needing
an extra case).

No functional changes intended.

Reviewed by: imp; no-objections by: mav
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D26286

Details

Provenance
bzAuthored on
Reviewer
mav
Differential Revision
D26286: cam_sim: harmonize code related to acquiring a mtx
Parents
rS365332: ice_ddp: Update package file to 1.3.16.0
Branches
Unknown
Tags
Unknown