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

Commit 6b85b32a authored by Sravan Kumar Kairam's avatar Sravan Kumar Kairam
Browse files

qcacmn: Add NULL sanity check in hif_fake_apps_resume_work

Add NULL sanity check in hif_fake_apps_resume_work to avoid
dereferencing the NULL pointer when QDF_BUG is disabled.

Change-Id: I9ea04eb144f229144470edfc268877ae74114676
CRs-Fixed: 2380943
parent 6ef2dfa1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -1178,6 +1178,9 @@ void hif_fake_apps_resume_work(struct work_struct *work)
		container_of(work, struct fake_apps_context, resume_work);

	QDF_BUG(ctx->resume_callback);
	if (!ctx->resume_callback)
		return;

	ctx->resume_callback(0);
	ctx->resume_callback = NULL;
}