Commit fcf8d018 authored by Luo Meng's avatar Luo Meng Committed by Mauro Carvalho Chehab

media: qm1d1c0042: fix error return code in qm1d1c0042_init()

Fix to return a negative error code from the error handling case
instead of 0 in function qm1d1c0042_init(), as done elsewhere
in this function.

Fixes: ab4d1452 ("[media] em28xx: add support for PLEX PX-BCUD (ISDB-S)")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarLuo Meng <luomeng12@huawei.com>
Acked-by: default avatarAkihiro Tsukada <tskd08@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 69518b52
...@@ -343,8 +343,10 @@ static int qm1d1c0042_init(struct dvb_frontend *fe) ...@@ -343,8 +343,10 @@ static int qm1d1c0042_init(struct dvb_frontend *fe)
if (val == reg_initval[reg_index][0x00]) if (val == reg_initval[reg_index][0x00])
break; break;
} }
if (reg_index >= QM1D1C0042_NUM_REG_ROWS) if (reg_index >= QM1D1C0042_NUM_REG_ROWS) {
ret = -EINVAL;
goto failed; goto failed;
}
memcpy(state->regs, reg_initval[reg_index], QM1D1C0042_NUM_REGS); memcpy(state->regs, reg_initval[reg_index], QM1D1C0042_NUM_REGS);
usleep_range(2000, 3000); usleep_range(2000, 3000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment