Skip to content

Commit bb664e5

Browse files
t-8chrafaeljw
authored andcommitted
ACPI: sysfs: remove return value of acpi_device_setup_files()
The function can not fail anymore, so drop its return value. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent cd48847 commit bb664e5

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

drivers/acpi/device_sysfs.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,9 @@ const struct attribute_group *acpi_groups[] = {
605605
* acpi_device_setup_files - Create sysfs attributes of an ACPI device.
606606
* @dev: ACPI device object.
607607
*/
608-
int acpi_device_setup_files(struct acpi_device *dev)
608+
void acpi_device_setup_files(struct acpi_device *dev)
609609
{
610-
int result = 0;
611-
612610
acpi_expose_nondev_subnodes(&dev->dev.kobj, &dev->data);
613-
614-
return result;
615611
}
616612

617613
/**

drivers/acpi/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
118118
int type, void (*release)(struct device *));
119119
int acpi_tie_acpi_dev(struct acpi_device *adev);
120120
int acpi_device_add(struct acpi_device *device);
121-
int acpi_device_setup_files(struct acpi_device *dev);
121+
void acpi_device_setup_files(struct acpi_device *dev);
122122
void acpi_device_remove_files(struct acpi_device *dev);
123123
extern const struct attribute_group *acpi_groups[];
124124
void acpi_device_add_finalize(struct acpi_device *device);

drivers/acpi/scan.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -795,10 +795,7 @@ int acpi_device_add(struct acpi_device *device)
795795
goto err;
796796
}
797797

798-
result = acpi_device_setup_files(device);
799-
if (result)
800-
pr_err("Error creating sysfs interface for device %s\n",
801-
dev_name(&device->dev));
798+
acpi_device_setup_files(device);
802799

803800
return 0;
804801

0 commit comments

Comments
 (0)