e_input: fix wrong return statement from e_input_device_output_name_set() 14/272714/1
authorduna.oh <duna.oh@samsung.com>
Wed, 23 Mar 2022 04:23:19 +0000 (13:23 +0900)
committerduna.oh <duna.oh@samsung.com>
Wed, 23 Mar 2022 04:44:14 +0000 (13:44 +0900)
Change-Id: I0797809c1d941c1da260ef1c03619c1775e3dedc

src/bin/e_input_device.c

index f2eefa5b3c985ca3a11e50c4f4d602f2dec0fc04..62273ce5c12a9d656bb893dabf521a0fa2233502 100644 (file)
@@ -1353,7 +1353,7 @@ EINTERN Eina_Bool
 e_input_device_output_name_set(E_Input_Device *dev, const char *input, const char *output)
 {
    E_Input_Seat *seat;
-   E_Input_Evdev *edev;
+   E_Input_Evdev *edev = NULL;
    Eina_List *l, *ll;
    Eina_Bool found = EINA_FALSE;
 
@@ -1373,12 +1373,13 @@ e_input_device_output_name_set(E_Input_Device *dev, const char *input, const cha
                   break;
                }
           }
+        if (found) break;
      }
 
    if (!found || !edev)
      {
         ERR("Failed to find input device: %s", input);
-        return EINA_TRUE;
+        return EINA_FALSE;
      }
 
    if (e_output_find(output))
@@ -1393,4 +1394,4 @@ e_input_device_output_name_set(E_Input_Device *dev, const char *input, const cha
      ERR("Failed to find output device: %s", output);
 
    return EINA_FALSE;
-}
\ No newline at end of file
+}