diff options
author | Liang He <windhl@126.com> | 2022-06-21 14:52:59 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-07-12 12:25:39 +0200 |
commit | 39c86b5c59a414cf2a94dbd6956a9a8e70188673 (patch) | |
tree | da63718cdd96e56f1d4b6574441f6144158fc9e4 | |
parent | 1c5fd97373115b932afa72fbc5425560e0d1148f (diff) | |
download | linux-39c86b5c59a414cf2a94dbd6956a9a8e70188673.tar.bz2 |
mmc: sdhci-of-esdhc: Fixup use of of_find_compatible_node()
Callers of of_find_compatible_node() should drop the reference count
accordingly, so let's do that.
Signed-off-by: Liang He <windhl@126.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20220621065259.4079817-1-windhl@126.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci-of-esdhc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 8b3d8119f388..e0266638381d 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1419,7 +1419,7 @@ static int esdhc_hs400_prepare_ddr(struct mmc_host *mmc) static int sdhci_esdhc_probe(struct platform_device *pdev) { struct sdhci_host *host; - struct device_node *np; + struct device_node *np, *tp; struct sdhci_pltfm_host *pltfm_host; struct sdhci_esdhc *esdhc; int ret; @@ -1464,7 +1464,9 @@ static int sdhci_esdhc_probe(struct platform_device *pdev) if (esdhc->vendor_ver > VENDOR_V_22) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; - if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) { + tp = of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc"); + if (tp) { + of_node_put(tp); host->quirks |= SDHCI_QUIRK_RESET_AFTER_REQUEST; host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; } |