virtio-blk: fix NULL checking in virtblk_alloc_req()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Sep 2012 12:32:53 +0000 (15:32 +0300)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 28 Sep 2012 05:35:14 +0000 (15:05 +0930)
commitf22cf8eb485260ac6e32a614121d44998d83a69a
tree9dd48f6f12bff4615f4c1a8eff8cdb13b2175ee6
parentc85a1f91b393a6c0c2ad382ba59d7618b29ab758
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)
drivers/block/virtio_blk.c