mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
coresight: trbe: Fix return value check in arm_trbe_register_coresight_cpu()
In case of error, the function devm_kasprintf() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210409094901.1903622-1-weiyongjun1@huawei.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
d19dea75b9
commit
68d400c079
1 changed files with 1 additions and 1 deletions
|
@ -871,7 +871,7 @@ static void arm_trbe_register_coresight_cpu(struct trbe_drvdata *drvdata, int cp
|
|||
|
||||
dev = &cpudata->drvdata->pdev->dev;
|
||||
desc.name = devm_kasprintf(dev, GFP_KERNEL, "trbe%d", cpu);
|
||||
if (IS_ERR(desc.name))
|
||||
if (!desc.name)
|
||||
goto cpu_clear;
|
||||
|
||||
desc.type = CORESIGHT_DEV_TYPE_SINK;
|
||||
|
|
Loading…
Add table
Reference in a new issue