Re: TI: X15 the connected SSD is not detected on Linux next 20221006 tag

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

 



On Mon, Dec 5, 2022, at 02:11, Serge Semin wrote:
> On Thu, Dec 01, 2022 at 12:48:32PM +0100, Anders Roxell wrote:

>> 
>>   for (i = 0; i < hpriv->n_clks; i++) {
>> - if (!strcmp(hpriv->clks[i].id, con_id))
>> + if (hpriv->clks && hpriv->clks[i].id &&
>> +    !strcmp(hpriv->clks[i].id, con_id))
>>   return hpriv->clks[i].clk;
>>   }
>
> Indeed I should have taken into account that devm_clk_bulk_get_all()
> can get unnamed clocks too. But checking the hpriv->clks pointer for
> being not null is redundant, since the ahci_platform_get_resources()
> procedure makes sure that the array is always allocated. At the very
> least you shouldn't check the pointer in the loop, but can make sure
> that the clks array is available before it.

Do you think this is otherwise the correct fix then? Any chance we
can still get a version of it into 6.1?

     Arnd



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux