summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-09-23 15:09:47 -0400
committerChris Michael <cp.michael@samsung.com>2014-09-23 15:09:47 -0400
commit39db828aade3021cddb89b7d7202d7e8ea288d9f (patch)
treeb578919e3e7f9ab1e6efeb09fc8dcfba171e3d55
parent431c3cac58e6391f238e52d13d61b51bf2d6ff9e (diff)
ecore-evas-drm: Fix calling ecore_drm_device_find twice in some cases
Summary: If no device name was passed in to ecore_drm_device_find function, then if we fail to find the default drm device on the first call, there is No point in calling the same function again to get the same result. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/ecore_evas/engines/drm/ecore_evas_drm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
index 3376485..12acf35 100644
--- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
+++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c
@@ -457,6 +457,10 @@ _ecore_evas_drm_init(const char *device)
457 { 457 {
458 ERR("Could not find drm device with name: %s. Falling back to default device.", device); 458 ERR("Could not find drm device with name: %s. Falling back to default device.", device);
459 459
460 /* if we already passed in NULL as device name, then no point in
461 * calling the find function below with no name either */
462 if (!device) goto dev_err;
463
460 /* try getting the default drm device */ 464 /* try getting the default drm device */
461 if (!(dev = ecore_drm_device_find(NULL, NULL))) 465 if (!(dev = ecore_drm_device_find(NULL, NULL)))
462 goto dev_err; 466 goto dev_err;