backlight: Fix copy/paste error printing an unrelated error code

udev_device_get_sysattr_value returns NULL on failure, but doesn't
provide an error code; thus, when printing an error from it, don't print
an unrelated error code from a previous call.
This commit is contained in:
Josh Triplett
2014-03-12 16:41:45 +01:00
committed by Lennart Poettering
parent 13b28d8224
commit cddc35f75e
+1 -1
View File
@@ -322,7 +322,7 @@ int main(int argc, char *argv[]) {
value = udev_device_get_sysattr_value(device, "brightness");
if (!value) {
log_error("Failed to read system attribute: %s", strerror(-r));
log_error("Failed to read system attribute");
return EXIT_FAILURE;
}