xen/xenbus: Remove the unnecessary check.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 29 Sep 2011 17:16:17 +0000 (13:16 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 19 Oct 2011 21:03:29 +0000 (17:03 -0400)
.. we check whether 'xdev' is NULL - but there is no need for
it as the 'dev' check is done before. The 'dev' is embedded in
the 'xdev' so having xdev != NULL with dev being being checked
is not going to happen.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xenbus/xenbus_probe_backend.c

index 60adf91..32417b5 100644 (file)
@@ -104,8 +104,6 @@ static int xenbus_uevent_backend(struct device *dev,
 
        xdev = to_xenbus_device(dev);
        bus = container_of(xdev->dev.bus, struct xen_bus_type, bus);
-       if (xdev == NULL)
-               return -ENODEV;
 
        if (add_uevent_var(env, "MODALIAS=xen-backend:%s", xdev->devicetype))
                return -ENOMEM;