Commit 59e746ca authored by Corentin Labbe's avatar Corentin Labbe Committed by Guenter Roeck
Browse files

hwmon: (acpi_power_meter) Fix style issues

parent 9ccafe46
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -530,6 +530,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource)

	for (i = 0; i < resource->num_domain_devices; i++) {
		struct acpi_device *obj = resource->domain_devices[i];

		if (!obj)
			continue;

@@ -590,7 +591,7 @@ static int read_domain_devices(struct acpi_power_meter_resource *resource)

	for (i = 0; i < pss->package.count; i++) {
		struct acpi_device *obj;
		union acpi_object *element = &(pss->package.elements[i]);
		union acpi_object *element = &pss->package.elements[i];

		/* Refuse non-references */
		if (element->type != ACPI_TYPE_LOCAL_REFERENCE)
@@ -788,7 +789,7 @@ static int read_capabilities(struct acpi_power_meter_resource *resource)
	str = &resource->model_number;

	for (i = 11; i < 14; i++) {
		union acpi_object *element = &(pss->package.elements[i]);
		union acpi_object *element = &pss->package.elements[i];

		if (element->type != ACPI_TYPE_STRING) {
			res = -EINVAL;
@@ -868,8 +869,7 @@ static int acpi_power_meter_add(struct acpi_device *device)
	if (!device)
		return -EINVAL;

	resource = kzalloc(sizeof(struct acpi_power_meter_resource),
			   GFP_KERNEL);
	resource = kzalloc(sizeof(*resource), GFP_KERNEL);
	if (!resource)
		return -ENOMEM;

@@ -884,7 +884,8 @@ static int acpi_power_meter_add(struct acpi_device *device)
	if (res)
		goto exit_free;

	resource->trip[0] = resource->trip[1] = -1;
	resource->trip[0] = -1;
	resource->trip[1] = -1;

	res = setup_attrs(resource);
	if (res)