xen/domain: Added debug safety in the domain_create() failure path
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Feb 2018 14:02:41 +0000 (14:02 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 9 Mar 2018 13:05:57 +0000 (13:05 +0000)
commitca8c67629a509f45e83ebdb0f679b692707ad7d9
tree922d2ffee85ec955bf331bd181f39d309665f98b
parent5175ce39d8ff0b36e981a7a261f9196aa1879918
xen/domain: Added debug safety in the domain_create() failure path

Hitting the fail path with err = 0 causes callers to dereference a NULL
pointer, as 0 fails an IS_ERR() check.

All of the paths appear to be fine, but leave some logic to help catch stray
misuses.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c