lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1520b33d-b490-468f-8759-f6b39653401d@linaro.org>
Date: Fri, 18 Oct 2024 17:02:32 +0100
From: James Clark <james.clark@...aro.org>
To: Zhen Lei <thunder.leizhen@...wei.com>,
 Suzuki K Poulose <suzuki.poulose@....com>
Cc: Mike Leach <mike.leach@...aro.org>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Mathieu Poirier <mathieu.poirier@...aro.org>,
 Anshuman Khandual <anshuman.khandual@....com>, coresight@...ts.linaro.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] coresight: trbe: Fix return value check in
 arm_trbe_register_coresight_cpu()



On 18/10/2024 3:08 pm, Zhen Lei wrote:
> Function devm_kzalloc() returns NULL instead of ERR_PTR() when it fails.
> The IS_ERR() test in the return value check should be replaced with NULL
> test.
> 
> Fixes: 39744738a67d ("coresight: trbe: Allocate platform data per device")
> Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver")

I don't think the code that this patches exists in 3fbf7f011f24, but it 
looks ok for 39744738a67d.

> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com>
> ---
>   drivers/hwtracing/coresight/coresight-trbe.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index 96a32b213669940..93fe9860acf16bd 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -1266,7 +1266,7 @@ static void arm_trbe_register_coresight_cpu(struct trbe_drvdata *drvdata, int cp
>   	 * into the device for that purpose.
>   	 */
>   	desc.pdata = devm_kzalloc(dev, sizeof(*desc.pdata), GFP_KERNEL);
> -	if (IS_ERR(desc.pdata))
> +	if (!desc.pdata)
>   		goto cpu_clear;
>   
>   	desc.type = CORESIGHT_DEV_TYPE_SINK;


Reviewed-by: James Clark <james.clark@...aro.org>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ