summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorXiaofei Tan <tanxiaofei@huawei.com>2021-03-27 15:08:24 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-04-08 17:27:03 +0300
commit6ee4bdc27d1aee6fb4dde9b28c95fe87d87c1438 (patch)
tree7ff2dad5b1f7567801b46c9ad69c82627037ed16 /drivers/acpi
parentd0fb66e999ffafe425833b8bdfcaabb3d7941c93 (diff)
downloadlinux-6ee4bdc27d1aee6fb4dde9b28c95fe87d87c1438.tar.xz
ACPI: dock: fix some coding style issues
Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: Missing a blank line after declarations ERROR: spaces required around that ':' WARNING: Statements should start on a tabstop Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/dock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 0937ceab052e..7cf92158008f 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -271,6 +271,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)
if (!acpi_device_enumerated(adev)) {
int ret = acpi_bus_scan(adev->handle);
+
if (ret)
dev_dbg(&adev->dev, "scan error %d\n", -ret);
}
@@ -502,6 +503,7 @@ static ssize_t flags_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct dock_station *dock_station = dev->platform_data;
+
return snprintf(buf, PAGE_SIZE, "%d\n", dock_station->flags);
}
@@ -523,7 +525,7 @@ static ssize_t undock_store(struct device *dev, struct device_attribute *attr,
begin_undock(dock_station);
ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
acpi_scan_lock_release();
- return ret ? ret: count;
+ return ret ? ret : count;
}
static DEVICE_ATTR_WO(undock);
@@ -535,10 +537,11 @@ static ssize_t uid_show(struct device *dev,
{
unsigned long long lbuf;
struct dock_station *dock_station = dev->platform_data;
+
acpi_status status = acpi_evaluate_integer(dock_station->handle,
"_UID", NULL, &lbuf);
if (ACPI_FAILURE(status))
- return 0;
+ return 0;
return snprintf(buf, PAGE_SIZE, "%llx\n", lbuf);
}