Skip to content

Commit

Permalink
Staging: hv: move ASSERT(scmnd) to a more useful location
Browse files Browse the repository at this point in the history
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 <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 9e62907 commit 8566ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8566ea7

Please sign in to comment.