All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: oe-kbuild-all@lists.linux.dev, Jiri Kosina <jikos@kernel.org>
Subject: [linux-next:master 1810/4011] drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting
Date: Sat, 15 Feb 2025 21:05:50 +0800	[thread overview]
Message-ID: <202502152006.fBBCdEr3-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0ae0fa3bf0b44c8611d114a9f69985bf451010c3
commit: 93a0fc48948107e0cc34e1de22c3cb363a8f2783 [1810/4011] HID: hid-appletb-kbd: add support for automatic brightness control while using the touchbar
config: parisc-randconfig-r072-20250215 (https://download.01.org/0day-ci/archive/20250215/202502152006.fBBCdEr3-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 14.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502152006.fBBCdEr3-lkp@intel.com/

smatch warnings:
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'

vim +405 drivers/hid/hid-appletb-kbd.c

   371	
   372	static int appletb_kbd_probe(struct hid_device *hdev, const struct hid_device_id *id)
   373	{
   374		struct appletb_kbd *kbd;
   375		struct device *dev = &hdev->dev;
   376		struct hid_field *mode_field;
   377		int ret;
   378	
   379		ret = hid_parse(hdev);
   380		if (ret)
   381			return dev_err_probe(dev, ret, "HID parse failed\n");
   382	
   383		mode_field = hid_find_field(hdev, HID_OUTPUT_REPORT,
   384					    HID_GD_KEYBOARD, HID_USAGE_MODE);
   385		if (!mode_field)
   386			return -ENODEV;
   387	
   388		kbd = devm_kzalloc(dev, sizeof(*kbd), GFP_KERNEL);
   389		if (!kbd)
   390			return -ENOMEM;
   391	
   392		kbd->mode_field = mode_field;
   393	
   394		ret = hid_hw_start(hdev, HID_CONNECT_HIDINPUT);
   395		if (ret)
   396			return dev_err_probe(dev, ret, "HID hw start failed\n");
   397	
   398		ret = hid_hw_open(hdev);
   399		if (ret) {
   400			dev_err_probe(dev, ret, "HID hw open failed\n");
   401			goto stop_hw;
   402		}
   403	
   404		kbd->backlight_dev = backlight_device_get_by_name("appletb_backlight");
 > 405			if (!kbd->backlight_dev)
 > 406				dev_err_probe(dev, ret, "Failed to get backlight device\n");
   407			else {
   408				backlight_device_set_brightness(kbd->backlight_dev, 2);
   409				timer_setup(&kbd->inactivity_timer, appletb_inactivity_timer, 0);
   410				mod_timer(&kbd->inactivity_timer, jiffies + msecs_to_jiffies(appletb_tb_dim_timeout * 1000));
   411			}
   412	
   413		kbd->inp_handler.event = appletb_kbd_inp_event;
   414		kbd->inp_handler.connect = appletb_kbd_inp_connect;
   415		kbd->inp_handler.disconnect = appletb_kbd_inp_disconnect;
   416		kbd->inp_handler.name = "appletb";
   417		kbd->inp_handler.id_table = appletb_kbd_input_devices;
   418		kbd->inp_handler.match = appletb_kbd_match_internal_device;
   419		kbd->inp_handler.private = kbd;
   420	
   421		ret = input_register_handler(&kbd->inp_handler);
   422		if (ret) {
   423			dev_err_probe(dev, ret, "Unable to register keyboard handler\n");
   424			goto close_hw;
   425		}
   426	
   427		ret = appletb_kbd_set_mode(kbd, appletb_tb_def_mode);
   428		if (ret) {
   429			dev_err_probe(dev, ret, "Failed to set touchbar mode\n");
   430			goto close_hw;
   431		}
   432	
   433		hid_set_drvdata(hdev, kbd);
   434	
   435		return 0;
   436	
   437	close_hw:
   438		hid_hw_close(hdev);
   439	stop_hw:
   440		hid_hw_stop(hdev);
   441		return ret;
   442	}
   443	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2025-02-15 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-15 13:05 kernel test robot [this message]
2025-02-15 18:43 ` [linux-next:master 1810/4011] drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting Aditya Garg
2025-02-17  4:47   ` Aditya Garg

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=202502152006.fBBCdEr3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gargaditya08@live.com \
    --cc=jikos@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.