lkml.org 
[lkml]   [2023]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: wm8960: Fix error handling in probe
On 09/09/2023 09:02, Guenter Roeck wrote:
> Commit 422f10adc3eb ("ASoC: wm8960: Add support for the power
> supplies")
> added regulator support to the wm8960 driver, but neglected to update
> error handling in the probe function. This results in warning
> backtraces
> if the probe function fails.
>
> WARNING: CPU: 0 PID: 1 at drivers/regulator/core.c:2396
> _regulator_put.part.0+0x1b4/0x1d8
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Tainted: G N
> 6.5.0-11075-g92901222f83d #1
> Hardware name: Freescale i.MX6 Ultralite (Device Tree)
> unwind_backtrace from show_stack+0x10/0x14
> show_stack from dump_stack_lvl+0x68/0x90
> dump_stack_lvl from __warn+0x70/0x1a4
> __warn from warn_slowpath_fmt+0xac/0x220
> warn_slowpath_fmt from _regulator_put.part.0+0x1b4/0x1d8
> _regulator_put.part.0 from regulator_bulk_free+0x44/0x64
> regulator_bulk_free from release_nodes+0x50/0x7c
> release_nodes from devres_release_group+0xbc/0x138
> devres_release_group from i2c_device_probe+0x180/0x268
> i2c_device_probe from really_probe+0xc4/0x2e0
> really_probe from __driver_probe_device+0x84/0x1a0
> __driver_probe_device from driver_probe_device+0x2c/0xc4
> driver_probe_device from __driver_attach+0x94/0x144
> __driver_attach from bus_for_each_dev+0x70/0xc4
> bus_for_each_dev from bus_add_driver+0xc4/0x1cc
> bus_add_driver from driver_register+0x7c/0x114
> driver_register from i2c_register_driver+0x3c/0xac
> i2c_register_driver from do_one_initcall+0x68/0x3b0
> do_one_initcall from kernel_init_freeable+0x18c/0x240
> kernel_init_freeable from kernel_init+0x14/0x144
> kernel_init from ret_from_fork+0x14/0x24
>
> Add the missing calls to regulator_bulk_disable().
>
> Cc: Fabio Estevam <festevam@denx.de>
> Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
> Fixes: 422f10adc3eb ("ASoC: wm8960: Add support for the power
> supplies")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Thanks for the fix:

Reviewed-by: Fabio Estevam <festevam@denx.de>

\
 
 \ /
  Last update: 2023-09-09 14:34    [W:0.042 / U:25.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site