Commit 3cb3e66f authored by Tsuchiya Yuto's avatar Tsuchiya Yuto Committed by Greg Kroah-Hartman
Browse files

media: atomisp: do not use err var when checking port validity for ISP2400



[ Upstream commit 9f6b4fa2 ]

Currently, the `port >= N_CSI_PORTS || err` checks for ISP2400 are always
evaluated as true because the err variable is set to `-EINVAL` on
declaration but the variable is never used until the evaluation.

Looking at the diff of commit 3c0538fb ("media: atomisp: get rid of
most checks for ISP2401 version"), the `port >= N_CSI_PORTS` check is
for ISP2400 and the err variable check is for ISP2401. Fix this issue
by adding ISP version test there accordingly.

Fixes: 3c0538fb ("media: atomisp: get rid of most checks for ISP2401 version")
Signed-off-by: default avatarTsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 08e43223
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment