discover: fix return value for discover_device_get_param
authorJeremy Kerr <jk@ozlabs.org>
Thu, 6 Mar 2014 10:14:00 +0000 (18:14 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 6 Mar 2014 10:14:00 +0000 (18:14 +0800)
We're incorrectly returning the name, we need the value.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/device-handler.c

index b083af4d0c6cdc0d406e9f609bcd7b387d4f6cbe..f1845a9479f4de878bfab4f5d6dcecbfcb1e69b1 100644 (file)
@@ -250,7 +250,7 @@ const char *discover_device_get_param(struct discover_device *device,
 
        list_for_each_entry(&device->params, param, list) {
                if (!strcmp(param->name, name))
 
        list_for_each_entry(&device->params, param, list) {
                if (!strcmp(param->name, name))
-                       return param->name;
+                       return param->value;
        }
        return NULL;
 }
        }
        return NULL;
 }