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

Commit 05f74af4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Add check to fix null pointer dereference during pipe reset"

parents a1410f70 c9eb9c5e
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -4246,11 +4246,15 @@ end:
 */
 */
static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer, bool is_recovery)
static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer, bool is_recovery)
{
{
	unsigned long pipe_map = mixer->pipe_mapped;
	unsigned long pipe_map;
	u32 bit = 0;
	u32 bit = 0;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	bool sw_rst_avail = mdss_mdp_pipe_is_sw_reset_available(mdata);
	bool sw_rst_avail = mdss_mdp_pipe_is_sw_reset_available(mdata);


	if (!mixer)
		return;

	pipe_map = mixer->pipe_mapped;
	pr_debug("pipe_map=0x%lx\n", pipe_map);
	pr_debug("pipe_map=0x%lx\n", pipe_map);
	for_each_set_bit_from(bit, &pipe_map, MAX_PIPES_PER_LM) {
	for_each_set_bit_from(bit, &pipe_map, MAX_PIPES_PER_LM) {
		struct mdss_mdp_pipe *pipe;
		struct mdss_mdp_pipe *pipe;