From: Zhang Changzhong <zhangchangzhong@huawei.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Zhang Changzhong <zhangchangzhong@huawei.com>,
<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] media: smiapp: Fix error return code in smiapp_probe()
Date: Fri, 4 Dec 2020 16:30:44 +0800 [thread overview]
Message-ID: <1607070645-32758-1-git-send-email-zhangchangzhong@huawei.com> (raw)
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@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.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
reply other threads:[~2020-12-04 8:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1607070645-32758-1-git-send-email-zhangchangzhong@huawei.com \
--to=zhangchangzhong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).