Skip to content

Commit 4052ea4

Browse files
tiwaigregkh
authored andcommitted
drm/amd/display: Fix kernel panic by dal_gpio_open() error
commit 920bb38 upstream. Currently both error code paths handled in dal_gpio_open_ex() issues ASSERT_CRITICAL(), and this leads to a kernel panic unnecessarily if CONFIG_KGDB is enabled. Since basically both are non-critical errors and can be recovered, drop those assert calls and use a safer one, BREAK_TO_DEBUGGER(), for allowing the debugging, instead. BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1177973 Cc: <stable@vger.kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c5e0a73 commit 4052ea4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/dc/gpio/gpio_base.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ enum gpio_result dal_gpio_open_ex(
6363
enum gpio_mode mode)
6464
{
6565
if (gpio->pin) {
66-
ASSERT_CRITICAL(false);
66+
BREAK_TO_DEBUGGER();
6767
return GPIO_RESULT_ALREADY_OPENED;
6868
}
6969

7070
// No action if allocation failed during gpio construct
7171
if (!gpio->hw_container.ddc) {
72-
ASSERT_CRITICAL(false);
72+
BREAK_TO_DEBUGGER();
7373
return GPIO_RESULT_NON_SPECIFIC_ERROR;
7474
}
7575
gpio->mode = mode;

0 commit comments

Comments
 (0)