Re: [PATCH 2/7] thermal: rcar_gen3_thermal: fix probe error path

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

 



On Mon, Mar 06, 2017 at 09:03:56PM +0100, Niklas Söderlund wrote:
> If the memory resource for a TSC is unviable probe should fail not try
> to go ahead with the remaining TSC. This fix is aligned with other
> checks in probe where probe fails if they are unavailable.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>

I disagree. There are likely SoCs in the future which have less than
TSC_MAX_NUM sensors (V3M shall have only 1 according to chapter 10C in
v0.52 documentation). So, the code exits the loop for this case. We
should move it before the devm_kzalloc(), however.

That also means that you can't really iterate over TSC_MAX_NUM in later
patches, but rather store the amount of instances in the main struct and
iterate over that value.




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux