scsi: ufs: Initialize cmd_id and check lrbp->cmd NULL
In commit d70b0a18 ("scsi: ufs: add command logging infrastructure"), cmd_id is not initialized and lrbp->cmd is explicitly dereferenced without checking NULL. Fix them by initializing cmd_id with an initial value 0 and checking NULL for lrbp->cmd. Change-Id: I6f66066adc8d53e3615df50ac49dd313f6d7ea8e Signed-off-by:Can Guo <cang@codeaurora.org>
Loading
Please register or sign in to comment