Merge "hardware: fix check for ro.hardware.<class> property"

This commit is contained in:
Colin Cross 2014-01-14 07:52:15 +00:00 committed by Gerrit Code Review
commit a97c6fecdb

View file

@ -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;
}