lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <25CD58FB-ED22-4CBC-8166-7340D1E1B4B1@live.com>
Date: Mon, 17 Feb 2025 04:46:05 +0000
From: Aditya Garg <gargaditya08@...e.com>
To: Jiri Kosina <jikos@...nel.org>, "jkosina@...e.com" <jkosina@...e.com>,
	Benjamin Tissoires <benjamin.tissoires@...hat.com>, "bentiss@...nel.org"
	<bentiss@...nel.org>, Dan Carpenter <dan.carpenter@...aro.org>
CC: Orlando Chamberlain <orlandoch.dev@...il.com>, Kerem Karabay
	<kekrby@...il.com>, "linux-input@...r.kernel.org"
	<linux-input@...r.kernel.org>, Linux Kernel Mailing List
	<linux-kernel@...r.kernel.org>
Subject: [PATCH v4 3/3] HID: appletb-kbd: Fix inconsistent indentation and
 pass -ENODEV to dev_err_probe

From: Aditya Garg <gargaditya08@...e.com>

The following warnings were flagged by the kernel test robot:

drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting
drivers/hid/hid-appletb-kbd.c:406 appletb_kbd_probe() warn: passing zero to 'dev_err_probe'

This patch aims at fixing those warnings.

Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502152006.fBBCdEr3-lkp@intel.com/
Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
Closes: https://lore.kernel.org/linux-input/6263a1a2-4d50-41db-aa54-cfcb3e0523a4@stanley.mountain/
Fixes: 93a0fc489481 ("HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar")
Signed-off-by: Aditya Garg <gargaditya08@...e.com>
---
 drivers/hid/hid-appletb-kbd.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c
index e45cc3ac4..d4b95aa3e 100644
--- a/drivers/hid/hid-appletb-kbd.c
+++ b/drivers/hid/hid-appletb-kbd.c
@@ -402,13 +402,13 @@ static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id
 	}
 
 	kbd->backlight_dev = backlight_device_get_by_name("appletb_backlight");
-		if (!kbd->backlight_dev)
-			dev_err_probe(dev, ret, "Failed to get backlight device\n");
-		else {
-			backlight_device_set_brightness(kbd->backlight_dev, 2);
-			timer_setup(&kbd->inactivity_timer, appletb_inactivity_timer, 0);
-			mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_dim_timeout * 1000));
-		}
+	if (!kbd->backlight_dev) {
+		dev_err_probe(dev, -ENODEV, "Failed to get backlight device\n");
+	} else {
+		backlight_device_set_brightness(kbd->backlight_dev, 2);
+		timer_setup(&kbd->inactivity_timer, appletb_inactivity_timer, 0);
+		mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_dim_timeout * 1000));
+	}
 
 	kbd->inp_handler.event = appletb_kbd_inp_event;
 	kbd->inp_handler.connect = appletb_kbd_inp_connect;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ