summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2020-12-04 14:46:56 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-12-07 15:56:00 +0300
commitbd1ed17d19eba00792cb29f369b8c29da1008d38 (patch)
tree3e8c1141b3ffc993b407f2be36b1e8962186e9f7 /drivers/media/i2c
parent747d2305029ab9a47eb01beb9d537b69f5a51a94 (diff)
downloadlinux-bd1ed17d19eba00792cb29f369b8c29da1008d38.tar.xz
media: 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") Reported-by: Zhang Changzhong <zhangchangzhong@huawei.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ccs/ccs-core.c2
1 files changed, 1 insertions, 1 deletions
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);