From 4fffffd3b13439980d778c58b1f63439287b9fdc Mon Sep 17 00:00:00 2001
From: Shawn Lin <shawn.lin@rock-chips.com>
Date: Wed, 26 Feb 2025 14:52:13 +0800
Subject: [PATCH] scsi: ufs: rockchip: Fix devm_clk_bulk_get_all_enabled()
 return value

A positive value is for the number of clocks obtained if assigned.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://lore.kernel.org/r/1740552733-182527-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/ufs/host/ufs-rockchip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/ufs/host/ufs-rockchip.c
+++ b/drivers/ufs/host/ufs-rockchip.c
@@ -171,7 +171,7 @@ static int ufs_rockchip_common_init(stru
 				"failed to get reset gpio\n");
 
 	err = devm_clk_bulk_get_all_enabled(dev, &host->clks);
-	if (err)
+	if (err < 0)
 		return dev_err_probe(dev, err, "failed to enable clocks\n");
 
 	host->hba = hba;
