msm: camera: tpg: Handling Null Pointer Dereference
Proper handling of null pointer dereference in tpg kernel code. Fix for cust CID: 121781 119491 CRs-Fixed: 3714844 Change-Id: I653a6e3721223f705a4f1579ab54c2a145bf2d3c Signed-off-by: Abhilash Mahapatra <quic_abhmah@quicinc.com>
This commit is contained in:
@@ -1330,7 +1330,7 @@ struct tpg_hw_request *tpg_hw_create_request(
|
|||||||
uint64_t request_id)
|
uint64_t request_id)
|
||||||
{
|
{
|
||||||
struct tpg_hw_request *req = NULL;
|
struct tpg_hw_request *req = NULL;
|
||||||
uint32_t num_vc_channels = hw->hw_info->max_vc_channels;
|
uint32_t num_vc_channels = 0;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
|
|
||||||
if (!hw) {
|
if (!hw) {
|
||||||
@@ -1338,6 +1338,8 @@ struct tpg_hw_request *tpg_hw_create_request(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
num_vc_channels = hw->hw_info->max_vc_channels;
|
||||||
|
|
||||||
/* Allocate request */
|
/* Allocate request */
|
||||||
req = kzalloc(sizeof(struct tpg_hw_request),
|
req = kzalloc(sizeof(struct tpg_hw_request),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
@@ -941,6 +941,7 @@ int tpg_1_4_layer_init(struct tpg_hw *hw)
|
|||||||
if (!dbgfileptr_parent) {
|
if (!dbgfileptr_parent) {
|
||||||
CAM_ERR(CAM_TPG, "Debug fs could not create directory");
|
CAM_ERR(CAM_TPG, "Debug fs could not create directory");
|
||||||
rc = -ENOENT;
|
rc = -ENOENT;
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
debugfs_create_file("tpg_xcfa_test", 0644,
|
debugfs_create_file("tpg_xcfa_test", 0644,
|
||||||
dbgfileptr_parent, hw, &tpg_1_4_xcfa_test);
|
dbgfileptr_parent, hw, &tpg_1_4_xcfa_test);
|
||||||
|
Reference in New Issue
Block a user