media: atomisp: Simplify atomisp_s_input() input argument checking
authorHans de Goede <hdegoede@redhat.com>
Thu, 11 Apr 2024 17:47:41 +0000 (18:47 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 Apr 2024 09:50:08 +0000 (10:50 +0100)
commit2bcbeeb2979d6f97c150ed88488b16e2bf83bf64
tree11210575a84beaa8a765bcad84b4277b9c832987
parent1a1ce0c308136e2bfdf326e1100809fe34558a4e
media: atomisp: Simplify atomisp_s_input() input argument checking

Simplify the checking of the input argument to atomisp_s_input():
- Remove the check for input >= ATOM_ISP_MAX_INPUTS, input_cnt
  never is > ATOM_ISP_MAX_INPUTS so checking only that is sufficient
- Remove the unnecessary camera local variable
- Move the 2 invalid argument checks to above the atomisp_pipe_check()
  which checks if the pipe is busy or not

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c