hwmon: (acpi_power_meter) Fix style issues
Fix style issues found by checkpatch. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Link: https://lore.kernel.org/r/20220509063010.3878134-2-clabbe@baylibre.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
9ccafe466c
commit
59e746ca86
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue