media: ccs: Fix return value from probe

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

Fixes: de10c1619c ("[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>
This commit is contained in:
Sakari Ailus 2020-12-04 12:46:56 +01:00 committed by Mauro Carvalho Chehab
parent 747d230502
commit bd1ed17d19
1 changed files with 1 additions and 1 deletions

View File

@ -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);