Commit 57fb3f66 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents fbf83212 d95d140e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}