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

Commit 7305ccde authored by Karthik Jayakumar's avatar Karthik Jayakumar Committed by Sridhar Gujje
Browse files

msm: camera: cdm: Fix of_match table null entry



KASAN identified global-out-of-bounds issue on:
msm_cam_hw_cdm_dt_match
Due to no null-terminating struct in the array.

CRs-Fixed: 2883523

Change-Id: I36e4811f239993e1e6de158df959157217c28bfe
Signed-off-by: default avatarKarthik Jayakumar <kjayakum@codeaurora.org>
parent 57996acb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/delay.h>
@@ -60,6 +60,7 @@ static const struct of_device_id msm_cam_hw_cdm_dt_match[] = {
		.compatible = CAM_HW_CDM_OPE_NAME_2_0,
		.data = &cam_cdm_2_0_reg_offset,
	},
	{},
};

static enum cam_cdm_id cam_hw_cdm_get_id_by_name(char *name)