[PATCH] drivers/video/fbdev/core/fbmem.c: add pointer judgment

songqiang songqiang at uniontech.com
Wed May 19 12:00:28 UTC 2021


Signed-off-by: songqiang <songqiang at uniontech.com>
---
 drivers/video/fbdev/core/fbmem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 072780b0e570..6036ab849475 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1859,6 +1859,9 @@ void fb_set_suspend(struct fb_info *info, int state)
 {
 	WARN_CONSOLE_UNLOCKED();
 
+	if (!info) {
+		return;
+	}
 	if (state) {
 		fbcon_suspended(info);
 		info->state = FBINFO_STATE_SUSPENDED;
-- 
2.20.1





More information about the dri-devel mailing list