diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-04-03 14:50:28 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-04-07 16:24:15 +0300 |
commit | 7374ccc0c322a6dc55f783a1a9c816c6f308d990 (patch) | |
tree | 6a7942db78afc0a47d55ed8a7e823a65e27d8c7b /tools/perf/builtin-script.c | |
parent | 14048ffed0145a425a8d3114ce8ff48172460238 (diff) | |
download | linux-stable-7374ccc0c322a6dc55f783a1a9c816c6f308d990.tar.gz linux-stable-7374ccc0c322a6dc55f783a1a9c816c6f308d990.tar.bz2 linux-stable-7374ccc0c322a6dc55f783a1a9c816c6f308d990.zip |
fbdev: sh_mobile_lcdc: Fix destruction of uninitialized mutex
If sh_mobile_lcdc_probe() fails after the allocation of driver-private
data, but before the initialization of all channels, a warning will be
printed due to the destruction of an uninitialized mutex:
WARNING: CPU: 0 PID: 1 at kernel/locking/mutex-debug.c:116 mutex_destroy+0x5c/0x7c()
DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock))
...
Backtrace:
...
[<c00425b4>] (mutex_destroy) from [<c01d5858>] (sh_mobile_lcdc_remove+0x1bc/0x230)
r4:df6a4800 r3:00000000
[<c01d569c>] (sh_mobile_lcdc_remove) from [<c01d6620>] (sh_mobile_lcdc_probe+0xd54/0xe28)
Move the initialization of the mutexes from sh_mobile_lcdc_channel_init()
to immediately after the allocation of driver-private data to fix this.
Note that the interrupt number is moved to a new variable "irq", so we
can reuse the existing variable "i" for iterating over the channels.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
0 files changed, 0 insertions, 0 deletions