From: Bill Pemberton Date: Mon, 3 May 2010 21:50:45 +0000 (-0400) Subject: Staging: hv: move ASSERT(scmnd) to a more useful location X-Git-Tag: MMI-PSA29.97-13-9~23841^2^2~256 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8566ea7c6f9660623a6f04bc73431f761dee32c7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: hv: move ASSERT(scmnd) to a more useful location There's not much point to make sure scmnd is not NULL after an assert that would dereference scmnd. The ASSERT()'s should be removed, but until they are at least they at least can be in the right order. Signed-off-by: Bill Pemberton Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 5e28e4c36434..26b35a6c679a 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -386,9 +386,9 @@ static void storvsc_commmand_completion(struct hv_storvsc_request *request) struct scsi_sense_hdr sense_hdr; ASSERT(request == &cmd_request->request); + ASSERT(scmnd); ASSERT((unsigned long)scmnd->host_scribble == (unsigned long)cmd_request); - ASSERT(scmnd); ASSERT(scmnd->scsi_done); DPRINT_ENTER(STORVSC_DRV);