mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aditya Garg <gargaditya08@live.com>
To: Jiri Kosina <jikos@kernel.org>,
	"jkosina@suse.com" <jkosina@suse.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	"bentiss@kernel.org" <bentiss@kernel.org>
Cc: Orlando Chamberlain <orlandoch.dev@gmail.com>,
	Kerem Karabay <kekrby@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: [PATCH v3 3/3] HID: appletb-kbd: Fix inconsistent indentation and pass -ENODEV to dev_err_probe
Date: Sat, 15 Feb 2025 18:40:39 +0000	[thread overview]
Message-ID: <21F8BD96-7E20-463A-A997-4FBCF0934D87@live.com> (raw)
In-Reply-To: <00768D5D-F9CB-45DA-8F5A-3E21E84A8AA8@live.com>

From: Aditya Garg <gargaditya08@live.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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502152006.fBBCdEr3-lkp@intel.com/
Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
 drivers/hid/hid-appletb-kbd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-appletb-kbd.c b/drivers/hid/hid-appletb-kbd.c
index e45cc3ac4..200db518a 100644
--- a/drivers/hid/hid-appletb-kbd.c
+++ b/drivers/hid/hid-appletb-kbd.c
@@ -402,9 +402,9 @@ 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 {
+		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));
-- 
2.43.0


      parent reply	other threads:[~2025-02-15 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15 18:38 [PATCH v3 1/3] HID: hid-appletb-kbd: simplify logic used to switch between media and function keys on pressing fn key Aditya Garg
2025-02-15 18:39 ` [PATCH v3 2/3] HID: hid-appletb-bl: fix incorrect error message for default brightness Aditya Garg
2025-02-15 18:40 ` Aditya Garg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21F8BD96-7E20-463A-A997-4FBCF0934D87@live.com \
    --to=gargaditya08@live.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=jkosina@suse.com \
    --cc=kekrby@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orlandoch.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®