Loading drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +9 −5 Original line number Diff line number Diff line /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1274,10 +1275,13 @@ static int __cam_req_mgr_create_subdevs( * */ static void __cam_req_mgr_destroy_subdev( struct cam_req_mgr_connected_device *l_device) struct cam_req_mgr_connected_device **l_device) { kfree(l_device); l_device = NULL; CAM_DBG(CAM_CRM, "*l_device %pK", *l_device); if (*(l_device) != NULL) { kfree(*(l_device)); *l_device = NULL; } } /** Loading Loading @@ -2374,7 +2378,7 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link) "Unlink for all devices was not successful"); /* Free memory holding data of linked devs */ __cam_req_mgr_destroy_subdev(link->l_dev); __cam_req_mgr_destroy_subdev(&link->l_dev); /* Destroy the link handle */ rc = cam_destroy_device_hdl(link->link_hdl); Loading Loading @@ -2537,7 +2541,7 @@ int cam_req_mgr_link(struct cam_req_mgr_link_info *link_info) mutex_unlock(&g_crm_core_dev->crm_lock); return rc; setup_failed: __cam_req_mgr_destroy_subdev(link->l_dev); __cam_req_mgr_destroy_subdev(&link->l_dev); create_subdev_failed: cam_destroy_device_hdl(link->link_hdl); link_info->link_hdl = 0; Loading Loading
drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +9 −5 Original line number Diff line number Diff line /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1274,10 +1275,13 @@ static int __cam_req_mgr_create_subdevs( * */ static void __cam_req_mgr_destroy_subdev( struct cam_req_mgr_connected_device *l_device) struct cam_req_mgr_connected_device **l_device) { kfree(l_device); l_device = NULL; CAM_DBG(CAM_CRM, "*l_device %pK", *l_device); if (*(l_device) != NULL) { kfree(*(l_device)); *l_device = NULL; } } /** Loading Loading @@ -2374,7 +2378,7 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link) "Unlink for all devices was not successful"); /* Free memory holding data of linked devs */ __cam_req_mgr_destroy_subdev(link->l_dev); __cam_req_mgr_destroy_subdev(&link->l_dev); /* Destroy the link handle */ rc = cam_destroy_device_hdl(link->link_hdl); Loading Loading @@ -2537,7 +2541,7 @@ int cam_req_mgr_link(struct cam_req_mgr_link_info *link_info) mutex_unlock(&g_crm_core_dev->crm_lock); return rc; setup_failed: __cam_req_mgr_destroy_subdev(link->l_dev); __cam_req_mgr_destroy_subdev(&link->l_dev); create_subdev_failed: cam_destroy_device_hdl(link->link_hdl); link_info->link_hdl = 0; Loading