]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-rng: refactor probe error handling
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 14 Oct 2014 23:52:33 +0000 (10:22 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 14 Oct 2014 23:55:14 +0000 (10:25 +1030)
commit1532f8c359ea2c2ea8215b5a3d15369edbe0cdf7
tree29f9d12a2b0c773d0fe5ef466e60e8c5abdd27be
parent2a943bf9c06a863ec9db1dbadb54b1cf59690363
virtio-rng: refactor probe error handling

Code like
vi->vq = NULL;
kfree(vi)
does not make sense.

Clean it up, use goto error labels for cleanup.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/hw_random/virtio-rng.c