diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-08 21:46:52 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-12-08 21:46:52 +0300 |
commit | 57fb3f66a3aa3e92b6008124bfa641702bd69a53 (patch) | |
tree | bead3df3c015f2ef0caa54ed13836a8148f010b5 | |
parent | fbf8321238bac04368f57af572e05a9c01347a0b (diff) | |
parent | d95d140e83634e7914277862dee841564d02879f (diff) | |
download | linux-57fb3f66a3aa3e92b6008124bfa641702bd69a53.tar.xz |
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
-rw-r--r-- | drivers/ata/libahci_platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c index ddf17e2d266c..b9e336bacf17 100644 --- a/drivers/ata/libahci_platform.c +++ b/drivers/ata/libahci_platform.c @@ -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; } |