diff mbox series

[1/1] ccs: Fix return value from probe

Message ID 20201204114950.25676-1-sakari.ailus@linux.intel.com
State Accepted
Commit bd1ed17d19eba00792cb29f369b8c29da1008d38
Headers show
Series [1/1] ccs: Fix return value from probe | expand

Commit Message

Sakari Ailus Dec. 4, 2020, 11:49 a.m. UTC
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")
Reported-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
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(-)
diff mbox series

Patch

diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index 7a461c0a730d..5f69e4c44533 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -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);