Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c32df787 authored by Satya Rama Aditya Pinapala's avatar Satya Rama Aditya Pinapala
Browse files

disp: msm: dsi: add check to avoid null pointer access



Add a check for valid pointer in the DSI CTRL logging macros
to fix null pointer access issues.

Change-Id: I92576e1db6c2d8b52c2adddd8c964bc2455536e4
Signed-off-by: default avatarSatya Rama Aditya Pinapala <psraditya30@codeaurora.org>
parent 9081908b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -33,13 +33,13 @@
#define TICKS_IN_MICRO_SECOND    1000000

#define DSI_CTRL_DEBUG(c, fmt, ...)	DRM_DEV_DEBUG(NULL, "[msm-dsi-debug]: %s: "\
		fmt, c->name, ##__VA_ARGS__)
		fmt, c ? c->name : "inv", ##__VA_ARGS__)
#define DSI_CTRL_ERR(c, fmt, ...)	DRM_DEV_ERROR(NULL, "[msm-dsi-error]: %s: "\
		fmt, c->name, ##__VA_ARGS__)
		fmt, c ? c->name : "inv", ##__VA_ARGS__)
#define DSI_CTRL_INFO(c, fmt, ...)	DRM_DEV_INFO(NULL, "[msm-dsi-info]: %s: "\
		fmt, c->name, ##__VA_ARGS__)
#define DSI_CTRL_WARN(c, fmt, ...)	DRM_WARN("[msm-dsi-warn]: %s: " fmt,\
		c->name, ##__VA_ARGS__)
		c ? c->name : "inv", ##__VA_ARGS__)

struct dsi_ctrl_list_item {
	struct dsi_ctrl *ctrl;