RDMA/amso1100: Add check if cache memory was allocated before freeing it
RDMA/amso1100: Add check if cache memory was allocated before freeing it

There is a path in handle_vq() where kmem_cache_free() can be called
with pointer to a local variable.  It can happen if vq_repbuf_alloc()
failed to allocate memory from cache and req is NULL.

The patch adds check if cache memory was allocated before freeing it.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Svetlana Mavrina <6075d59fdb7327e19cf1f88e5e5b706b9357f60a@gmail.com>
Reviewed-by: Alexey Khoroshilov <a9985f635ca4eb5d7c64df6d16c76aa9811509c5@ispras.ru>
Signed-off-by: Roland Dreier <0d270388f2f92757a5de0f4bd891d3b392c44c4f@purestorage.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs