mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Merge tag 'ata-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata
Pull ATA fix from Damien Le Moal: - Avoid a NULL pointer dereference in the libahci platform code that can happen on initialization when a device tree does not specify names for the adapter clocks (from Anders) * tag 'ata-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata: ata: libahci_platform: ahci_platform_find_clk: oops, NULL pointer
This commit is contained in:
@@ -109,7 +109,7 @@ struct clk *ahci_platform_find_clk(struct ahci_host_priv *hpriv, const char *con
|
||||
int i;
|
||||
|
||||
for (i = 0; i < hpriv->n_clks; i++) {
|
||||
if (!strcmp(hpriv->clks[i].id, con_id))
|
||||
if (hpriv->clks[i].id && !strcmp(hpriv->clks[i].id, con_id))
|
||||
return hpriv->clks[i].clk;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user