]> git.proxmox.com Git - qemu.git/commit
ivshmem: add missing error exit(2)
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 3 Jun 2013 08:58:31 +0000 (10:58 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 17 Jun 2013 21:40:54 +0000 (16:40 -0500)
commit6b6f105349f5ef55c6a93193d8618524078f069b
tree8b01cc16955a9b97325fa1ab06e87b10601d5312
parent3202c02817ff0b03879653367e2e195bf387ec02
ivshmem: add missing error exit(2)

If the user fails to specify 'chardev' or 'shm' then we cannot continue.
Exit right away so that we don't invoke shm_open(3) with a NULL pointer.

It would be nice to replace exit(1) with error returns in the PCI device
.init() function, but leave that for another patch since exit(1) is
currently used elsewhere.

Spotted by Coverity.

Cc: Cam Macdonell <cam@cs.ualberta.ca>
Cc: qemu-stable@nongnu.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit baefb8bf8e4a708c601bbab898a6039cd9cd12e3)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/misc/ivshmem.c