[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1607070645-32758-1-git-send-email-zhangchangzhong@huawei.com>
Date: Fri, 4 Dec 2020 16:30:44 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
CC: Zhang Changzhong <zhangchangzhong@...wei.com>,
<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] media: smiapp: Fix error return code in smiapp_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: de10c1619c48 ("[media] smiapp: Get clock rate if it's not available through DT")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 6fc0680..45394b9 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2892,7 +2892,7 @@ static int smiapp_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);
--
2.9.5
Powered by blists - more mailing lists