virtio-blk: fix NULL checking in virtblk_alloc_req()

Smatch complains about the inconsistent NULL checking here.  Fix it to
return NULL on failure.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (fixed accidental deletion)
This commit is contained in:
Dan Carpenter 2012-09-05 15:32:53 +03:00 • committed by Rusty Russell
commit f22cf8eb48