mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
media: qm1d1c0042: fix error return code in qm1d1c0042_init()
[ Upstream commitfcf8d018bd] 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:ab4d14528f("[media] em28xx: add support for PLEX PX-BCUD (ISDB-S)") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Luo Meng <luomeng12@huawei.com> Acked-by: Akihiro Tsukada <tskd08@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -352,8 +352,10 @@ static int qm1d1c0042_init(struct dvb_frontend *fe)
|
||||
if (val == reg_initval[reg_index][0x00])
|
||||
break;
|
||||
}
|
||||
if (reg_index >= QM1D1C0042_NUM_REG_ROWS)
|
||||
if (reg_index >= QM1D1C0042_NUM_REG_ROWS) {
|
||||
ret = -EINVAL;
|
||||
goto failed;
|
||||
}
|
||||
memcpy(state->regs, reg_initval[reg_index], QM1D1C0042_NUM_REGS);
|
||||
usleep_range(2000, 3000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user