From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Thu, 29 Sep 2011 17:16:17 +0000 (-0400)
Subject: xen/xenbus: Remove the unnecessary check.
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d98b15db376b9cc35f74fd2bd432b9fc287a5999;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

xen/xenbus: Remove the unnecessary check.

.. 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>
---

diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
index 60adf919d78d..32417b5064fd 100644
--- a/drivers/xen/xenbus/xenbus_probe_backend.c
+++ b/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -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;