]> git.baikalelectronics.ru Git - kernel.git/commit
xen-pciback: properly clean up after calling pcistub_device_find()
authorJan Beulich <JBeulich@suse.com>
Mon, 24 Sep 2012 14:55:37 +0000 (15:55 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 25 Sep 2012 12:53:27 +0000 (08:53 -0400)
commita0cffeb3fc24c6b55bdc399291203333bcc5e6e9
tree0bffc5bbd72c88d72e9e731be6d942e01ea9f044
parent2fd7de18d602c08d9f835b3c04de140ca21c3a16
xen-pciback: properly clean up after calling pcistub_device_find()

As the function calls pcistub_device_get() before returning non-NULL,
its callers need to take care of calling pcistub_device_put() on
(mostly, but not exclusively) error paths.

Otoh, the function already guarantees that the 'dev' member is non-NULL
upon successful return, so callers do not need to check for this a
second time.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-pciback/pci_stub.c