Skip to contentSkip to conversation

ccs: Fix return value from probe

PATCH New Sakari Ailus 1 participant 1 message Dec 4, 2020

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ccs: Fix return value from probe

rval wasn't set, resulting in probe returning zero instead of an error.

Fixes de10c1619c48 ("[media] smiapp: Get clock rate if it's not available through DT")

---
Hi Zhang,

The smiapp driver has been renamed as "ccs" and the surrounding code has changed, too. So I wrote this one. Thank you for the patch in any case.

 drivers/media/i2c/ccs/ccs-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ccs/ccs-core.c +1 -1
index 7a461c0a730d..5f69e4c44533 100644
@@ -3030,7 +3030,7 @@ static int ccs_probe(struct i2c_client *client)
 				dev_err(&client->dev,
 					"can't set clock freq, asked for %u but got %lu\n",
 					sensor->hwcfg.ext_clk, rate);
-				return rval;
+				return -EINVAL;
 			}
 		} else {
 			sensor->hwcfg.ext_clk = clk_get_rate(sensor->ext_clk);
Signature · 1 line
2.27.0