]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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 18:48:05 +0000 (14:48 -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 6cf467bf63ec8f4c7ed9b720f1c4710d4ee60089..c8db5008ce5fcf5d30a748c32571ea4f833d1083 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;
 
        /* stuff we want to pass to /sbin/hotplug */
        if (add_uevent_var(env, "XENBUS_TYPE=%s", xdev->devicetype))