« Previous | Next » 

Revision baefb8bf


Added by Stefan Hajnoczi over 7 years ago

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 <>
Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Eric Blake <>
Signed-off-by: Michael Tokarev <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences