提交 e0a27bad 编写于 作者: J Joker2770

perf: assign '-1' to uninitialized variable: ret

Signed-off-by: NJoker2770 <1214220480@qq.com>
上级 43bdf2f1
......@@ -65,7 +65,7 @@ static int RandomHwClose(struct file *filep)
static int RandomHwIoctl(struct file *filep, int cmd, unsigned long arg)
{
int ret;
int ret = -1;
switch (cmd) {
default:
......@@ -77,7 +77,7 @@ static int RandomHwIoctl(struct file *filep, int cmd, unsigned long arg)
static ssize_t RandomHwRead(struct file *filep, char *buffer, size_t buflen)
{
int ret;
int ret = -1;
if (g_randomOp.read != NULL) {
ret = g_randomOp.read(buffer, buflen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册