hardware: fix check for ro.hardware.<class> property
Replace == with >, property_get returns the length of the property if found. Change-Id: I4b8fe8f8dba578112d21eee5dc64be4aa27f3bfb
This commit is contained in:
parent
e0c252ae43
commit
f7d761ca34
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
|
|||
|
||||
/* First try a property specific to the class and possibly instance */
|
||||
snprintf(prop_name, sizeof(prop_name), "ro.hardware.%s", name);
|
||||
if (property_get(prop_name, prop, NULL) == 0) {
|
||||
if (property_get(prop_name, prop, NULL) > 0) {
|
||||
if (hw_module_exists(path, sizeof(path), name, prop) == 0) {
|
||||
goto found;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue