msm: kgsl: Check for failure in coresight initialization
We need to check for both NULL pointer and error condition in coresight initialization and return with proper error. CR's-Fixed: 971398 Change-Id: Id1e3e0f756ac1c9a0ff4f4e6ce073e80e31473b8 Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
This commit is contained in:
parent
9a313755d2
commit
d051b70968
1 changed files with 3 additions and 2 deletions
|
@ -313,8 +313,9 @@ int adreno_coresight_init(struct adreno_device *adreno_dev)
|
|||
|
||||
desc.pdata = of_get_coresight_platform_data(&device->pdev->dev,
|
||||
device->pdev->dev.of_node);
|
||||
if (desc.pdata == NULL)
|
||||
return -ENODEV;
|
||||
if (IS_ERR_OR_NULL(desc.pdata))
|
||||
return (desc.pdata == NULL) ? -ENODEV :
|
||||
PTR_ERR(desc.pdata);
|
||||
|
||||
desc.type = CORESIGHT_DEV_TYPE_SOURCE;
|
||||
desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_BUS;
|
||||
|
|
Loading…
Add table
Reference in a new issue