[PATCH] coresight: Fix uninitialised variable use in coresight_disable

Suzuki K Poulose suzuki.poulose at arm.com
Tue Jan 24 02:41:01 PST 2023


On 24/01/2023 10:35, James Clark wrote:
> 
> 
> On 23/01/2023 16:47, Suzuki K Poulose wrote:
>> Kernel test robot reports:
>>
>>   drivers/hwtracing/coresight/coresight-core.c:1176:7: warning: variable
>>   'hash' is used uninitialized whenever switch case is taken
>>   [-Wsometimes-uninitialized]
>>
>> 	case CORESIGHT_DEV_SUBTYPE_SOURCE_PROC:
>> 	      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>   drivers/hwtracing/coresight/coresight-core.c:1195:24: note: uninitialized
>>   use occurs here
>> 		idr_remove(&path_idr, hash);
>> 		                      ^~~~
>> Fix this by moving the usage of the hash variable to where it actually
>> should have been.
>>
>> Cc: Mao Jinlong <quic_jinlmao at quicinc.com>
>> Reported-by: kernel test robot <lkp at intel.com>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose at arm.com>
> 
> Reviewed-by: James Clark <james.clark at arm.com>
> 

Thanks James, I have now pushed this to next

https://git.kernel.org/coresight/c/0c507af711df7e7b114f



More information about the linux-arm-kernel mailing list