linux/drivers/video/console
Dejin Zheng fd6aeb2e69 console: newport_con: fix an issue about leak related system resources
[ Upstream commit fd4b824387 ]

A call of the function do_take_over_console() can fail here.
The corresponding system resources were not released then.
Thus add a call of iounmap() and release_mem_region()
together with the check of a failure predicate. and also
add release_mem_region() on device removal.

Fixes: e86bb8acc0 ("[PATCH] VT binding: Make newport_con support binding")
Suggested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200423164251.3349-1-zhengdejin5@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:14:54 +02:00
..
dummycon.c dummycon: Stop exporting dummycon_[un]register_output_notifier 2018-08-10 17:23:02 +02:00
Kconfig fbcon: Only allow FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER if fbdev is builtin 2018-08-10 17:23:01 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mdacon.c mdacon: replace MDA_ADDR macro by inline function 2017-06-14 17:40:56 +02:00
newport_con.c console: newport_con: fix an issue about leak related system resources 2020-08-19 08:14:54 +02:00
sticon.c tty: vt, cleanup and document con_scroll 2016-10-27 16:37:43 +02:00
sticore.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
vgacon.c vgacon: Fix for missing check in scrollback handling 2020-08-11 15:32:31 +02:00