« Previous | Next » 

Revision baefb8bf

IDbaefb8bf8e4a708c601bbab898a6039cd9cd12e3

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

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences