Skip to content

Commit ded40f3

Browse files
ambarusandersson
authored andcommitted
scsi: ufs: qcom: 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: 56541c7 ("scsi: ufs: ufs-qcom: 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> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> # SCSI Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20250117-qcom-ice-fix-dev-leak-v2-3-1ffa5b6884cb@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent cbef744 commit ded40f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ufs/host/ufs-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static int ufs_qcom_ice_init(struct ufs_qcom_host *host)
125125
int err;
126126
int i;
127127

128-
ice = of_qcom_ice_get(dev);
128+
ice = devm_of_qcom_ice_get(dev);
129129
if (ice == ERR_PTR(-EOPNOTSUPP)) {
130130
dev_warn(dev, "Disabling inline encryption support\n");
131131
ice = NULL;

0 commit comments

Comments
 (0)