Skip to content

Commit cbef744

Browse files
ambarusandersson
authored andcommitted
mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get
The driver leaks the device reference taken with of_find_device_by_node(). Fix the leak by using devm_of_qcom_ice_get(). Fixes: c7eed31 ("mmc: sdhci-msm: Switch to the new ICE API") Cc: stable@vger.kernel.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20250117-qcom-ice-fix-dev-leak-v2-2-1ffa5b6884cb@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 1c13d60 commit cbef744

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mmc/host/sdhci-msm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
18731873
if (!(cqhci_readl(cq_host, CQHCI_CAP) & CQHCI_CAP_CS))
18741874
return 0;
18751875

1876-
ice = of_qcom_ice_get(dev);
1876+
ice = devm_of_qcom_ice_get(dev);
18771877
if (ice == ERR_PTR(-EOPNOTSUPP)) {
18781878
dev_warn(dev, "Disabling inline encryption support\n");
18791879
ice = NULL;

0 commit comments

Comments
 (0)