diff options
author | vhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com> | 2005-12-31 19:35:11 +0000 |
---|---|---|
committer | vhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com> | 2005-12-31 19:35:11 +0000 |
commit | 27c7f637f8bc130570326b7210de9a83a89adcc0 (patch) | |
tree | a27d859d1d726d6954e911a6b4d97fee04627537 | |
parent | 05a04604e5aae9da507d5aa5898cb50cbd5546c6 (diff) | |
download | xen-27c7f637f8bc130570326b7210de9a83a89adcc0.tar.gz xen-27c7f637f8bc130570326b7210de9a83a89adcc0.tar.bz2 xen-27c7f637f8bc130570326b7210de9a83a89adcc0.zip |
remove one pointless macro and make code paths explicit.
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
-rw-r--r-- | linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c index 09001a5463..176d53ca76 100644 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c @@ -542,14 +542,6 @@ static int xenbus_probe_node(struct xen_bus_type *bus, const char *type, const char *nodename) { -#define CHECK_FAIL \ - do { \ - if (err) \ - goto fail; \ - } \ - while (0) \ - - int err; struct xenbus_device *xendev; size_t stringlen; @@ -584,19 +576,18 @@ static int xenbus_probe_node(struct xen_bus_type *bus, xendev->dev.release = xenbus_dev_release; err = bus->get_bus_id(xendev->dev.bus_id, xendev->nodename); - CHECK_FAIL; + if (err) + goto fail; /* Register with generic device framework. */ err = device_register(&xendev->dev); - CHECK_FAIL; + if (err) + goto fail; device_create_file(&xendev->dev, &dev_attr_nodename); device_create_file(&xendev->dev, &dev_attr_devtype); return 0; - -#undef CHECK_FAIL - fail: xenbus_dev_free(xendev); return err; |