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

Commit 96df32da authored by Mangalaram ARCHANA's avatar Mangalaram ARCHANA Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: lrme : Fix for lrme_hw null dereference



Fixes lrme_hw pointer when lrme_hw becomes null
returns with -ENODEV.

Change-Id: Ic2c15ebad868b056be4ce4ac28196960a1889292
Signed-off-by: default avatarMangalaram ARCHANA <mangar@codeaurora.org>
parent b62fce34
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/platform_device.h>
@@ -237,8 +237,7 @@ static int cam_lrme_hw_dev_remove(struct platform_device *pdev)
	lrme_hw = platform_get_drvdata(pdev);
	if (!lrme_hw) {
		CAM_ERR(CAM_LRME, "Invalid lrme_hw from fd_hw_intf");
		rc = -ENODEV;
		goto deinit_platform_res;
		return -ENODEV;
	}

	lrme_core = (struct cam_lrme_core *)lrme_hw->core_info;