Hi Guenter, On Tue, Mar 19, 2019 at 09:32:36AM -0700, Guenter Roeck wrote: > The following traceback was reported on ASUS C201, which does not support > console logging. > > ------------[ cut here ]------------ > WARNING: CPU: 2 PID: 361 at kernel/workqueue.c:3030 __flush_work+0x38/0x154 > Modules linked in: snd_soc_hdmi_codec cros_ec_debugfs cros_ec_sysfs uvcvideo dw_hdmi_cec dw_hdmi_i2s_audio videobuf2_vmalloc cfg80211 gpio_charger rk_crypto rfkill videobuf2_memops videobuf2_v4l2 des_generic videobuf2_common ofpart m25p80 spi_nor tpm_i2c_infineon sbs_battery mtd tpm joydev cros_ec_dev coreboot_table evdev mousedev ip_tables x_tables [last unloaded: brcmutil] > CPU: 2 PID: 361 Comm: systemd-sleep Not tainted 5.1.0-rc1-1-ARCH+ #1 > Hardware name: Rockchip (Device Tree) > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0x7c/0x9c) > [] (dump_stack) from [] (__warn+0xd0/0xec) > [] (__warn) from [] (warn_slowpath_null+0x38/0x44) > [] (warn_slowpath_null) from [] (__flush_work+0x38/0x154) > [] (__flush_work) from [] (__cancel_work_timer+0x114/0x1a4) > [] (__cancel_work_timer) from [] (cros_ec_debugfs_suspend+0x14/0x1c [cros_ec_debugfs]) > [] (cros_ec_debugfs_suspend [cros_ec_debugfs]) from [] (dpm_run_callback+0x64/0xcc) > [] (dpm_run_callback) from [] (__device_suspend+0x174/0x3a8) > [] (__device_suspend) from [] (dpm_suspend+0x174/0x1e0) > [] (dpm_suspend) from [] (suspend_devices_and_enter+0x6c/0x50c) > [] (suspend_devices_and_enter) from [] (pm_suspend+0x20c/0x274) > [] (pm_suspend) from [] (state_store+0x54/0x88) > [] (state_store) from [] (kernfs_fop_write+0x114/0x180) > [] (kernfs_fop_write) from [] (__vfs_write+0x1c/0x154) > [] (__vfs_write) from [] (vfs_write+0xb8/0x198) > [] (vfs_write) from [] (ksys_write+0x3c/0x74) > [] (ksys_write) from [] (ret_fast_syscall+0x0/0x4c) > Exception stack(0xe9365fa8 to 0xe9365ff0) > 5fa0: 00000004 beef8b28 00000004 beef8b28 00000004 00000000 > 5fc0: 00000004 beef8b28 02319170 00000004 beef8b28 00000004 b6f3d900 beef8b74 > 5fe0: 0000006c beef8a98 b6c0adac b6c66534 > ---[ end trace f4ee5df14e8ea0ec ]--- > > If console logging is not supported, the work structure is never > initialized, resulting in the traceback. Calling cancel/schedule functions > conditionally fixes the problem. > > While at it, also fix error handling in the probe function. > > Reported-by: Urja Rannikko > Cc: Urja Rannikko > Fixes: 6fce0a2cf5a05 ("mfd / platform: cros_ec: Move debugfs attributes to its own driver") > Signed-off-by: Guenter Roeck Looks good. Applied to 5.1-fixes. Thanks for the quick fix. Benson -- Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org