Re: [PATCH] firmware: tegra: bpmp: Fix freeing uninitialized pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/10/2024 22:09, Zichen Xie wrote:
> I don't think device_node() is a correct freeing function here:
> 'struct device_node *np __free(device_node);'
> even if I'm not an expert in Kernel.
> 
> And I think it could be more convincing to explain 'why', rather than
> simply highlighting the errors repeatedly.

If you ever bothered to compile your code, you would see why.

None of your arguments make any sense. Your code tries to perform
initialization, just before assignment so it is completely unnecessary.
I don't understand why you could not spot that obvious part of the code,
because this is just C. For obvious reasons I won't be spending my time
to explain why this:

some_ptr *ptr = NULL;
ptr = foo;
if () ...
   return ...;

is wrong. You just did not read the code, not built it.

Best regards,
Krzysztof





[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux