[PATCH 2/4] Simplify logic and remove redundant condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



connector is only created after the fail condition, so checking to
destroy it isn't needed.

---
 drivers/gpu/drm/omapdrm/omap_connector.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index ce2d67b..60ef6ad 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -293,7 +293,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
 
 	omap_connector = kzalloc(sizeof(struct omap_connector), GFP_KERNEL);
 	if (!omap_connector)
-		goto fail;
+		return NULL;
 
 	omap_connector->dssdev = dssdev;
 	omap_connector->encoder = encoder;
@@ -318,10 +318,4 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
 	drm_connector_register(connector);
 
 	return connector;
-
-fail:
-	if (connector)
-		omap_connector_destroy(connector);
-
-	return NULL;
 }
-- 
2.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux