summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Goodbody <[email protected]>2025-10-21 17:08:26 +0100
committerTom Rini <[email protected]>2025-12-04 09:38:16 -0600
commit42d30f9447c136d2c1f46c8a12e6058e3cddc3b6 (patch)
tree19a07ed2c6e22e952dac2ae761ed83cb5f1901da /drivers
parente24a7b3b172379b50a7fa96ab4634de109c3e432 (diff)
mmc: fsl_esdhc_imx: Cannot test unsigned to be < 0
Testing an unisgned member of a struct to be <= 0 will only detect the case when it is 0. So correct this error test to a working version that will behave as expected. Signed-off-by: Andrew Goodbody <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 926113f79d3..7dc76563b7e 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1543,7 +1543,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
init_clk_usdhc(dev_seq(dev));
priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev));
- if (priv->sdhc_clk <= 0) {
+ if (!priv->sdhc_clk || IS_ERR_VALUE(priv->sdhc_clk)) {
dev_err(dev, "Unable to get clk for %s\n", dev->name);
return -EINVAL;
}