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

hwmon: (acpi_power_meter) Fix style issues

Fix style issues found by checkpatch.
Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
Link: https://lore.kernel.org/r/20220509063010.3878134-2-clabbe@baylibre.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 9ccafe46
...@@ -530,6 +530,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource) ...@@ -530,6 +530,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource)
for (i = 0; i < resource->num_domain_devices; i++) { for (i = 0; i < resource->num_domain_devices; i++) {
struct acpi_device *obj = resource->domain_devices[i]; struct acpi_device *obj = resource->domain_devices[i];
if (!obj) if (!obj)
continue; continue;
...@@ -590,7 +591,7 @@ static int read_domain_devices(struct acpi_power_meter_resource *resource) ...@@ -590,7 +591,7 @@ static int read_domain_devices(struct acpi_power_meter_resource *resource)
for (i = 0; i < pss->package.count; i++) { for (i = 0; i < pss->package.count; i++) {
struct acpi_device *obj; struct acpi_device *obj;
union acpi_object *element = &(pss->package.elements[i]); union acpi_object *element = &pss->package.elements[i];
/* Refuse non-references */ /* Refuse non-references */
if (element->type != ACPI_TYPE_LOCAL_REFERENCE) if (element->type != ACPI_TYPE_LOCAL_REFERENCE)
...@@ -788,7 +789,7 @@ static int read_capabilities(struct acpi_power_meter_resource *resource) ...@@ -788,7 +789,7 @@ static int read_capabilities(struct acpi_power_meter_resource *resource)
str = &resource->model_number; str = &resource->model_number;
for (i = 11; i < 14; i++) { 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) { if (element->type != ACPI_TYPE_STRING) {
res = -EINVAL; res = -EINVAL;
...@@ -868,8 +869,7 @@ static int acpi_power_meter_add(struct acpi_device *device) ...@@ -868,8 +869,7 @@ static int acpi_power_meter_add(struct acpi_device *device)
if (!device) if (!device)
return -EINVAL; return -EINVAL;
resource = kzalloc(sizeof(struct acpi_power_meter_resource), resource = kzalloc(sizeof(*resource), GFP_KERNEL);
GFP_KERNEL);
if (!resource) if (!resource)
return -ENOMEM; return -ENOMEM;
...@@ -884,7 +884,8 @@ static int acpi_power_meter_add(struct acpi_device *device) ...@@ -884,7 +884,8 @@ static int acpi_power_meter_add(struct acpi_device *device)
if (res) if (res)
goto exit_free; goto exit_free;
resource->trip[0] = resource->trip[1] = -1; resource->trip[0] = -1;
resource->trip[1] = -1;
res = setup_attrs(resource); res = setup_attrs(resource);
if (res) if (res)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment