All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 1810/4011] drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting
@ 2025-02-15 13:05 kernel test robot
  2025-02-15 18:43 ` Aditya Garg
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-02-15 13:05 UTC (permalink / raw)
  To: Aditya Garg; +Cc: oe-kbuild-all, Jiri Kosina

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-17  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-15 13:05 [linux-next:master 1810/4011] drivers/hid/hid-appletb-kbd.c:405 appletb_kbd_probe() warn: inconsistent indenting kernel test robot
2025-02-15 18:43 ` Aditya Garg
2025-02-17  4:47   ` Aditya Garg

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.