Skip to content

Commit

Permalink
Merge tag 'ata-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Dec 8, 2022
2 parents fbf8321 + d95d140 commit 57fb3f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/libahci_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 57fb3f6

Please sign in to comment.