Skip to content

Commit 57fb3f6

Browse files
committed
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
2 parents fbf8321 + d95d140 commit 57fb3f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/libahci_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct clk *ahci_platform_find_clk(struct ahci_host_priv *hpriv, const char *con
109109
int i;
110110

111111
for (i = 0; i < hpriv->n_clks; i++) {
112-
if (!strcmp(hpriv->clks[i].id, con_id))
112+
if (hpriv->clks[i].id && !strcmp(hpriv->clks[i].id, con_id))
113113
return hpriv->clks[i].clk;
114114
}
115115

0 commit comments

Comments
 (0)