Commit e67b5f83 authored by Darshan Rathod's avatar Darshan Rathod Committed by Hans Verkuil
Browse files

media: uvcvideo: Fix assignment in if condition



The function uvc_input_init() uses an assignment of the return value
of input_register_device() within the condition of an if statement.

This coding style is discouraged by the Linux kernel coding style guide
as it can be confused with a comparison and hide potential bugs.
The checkpatch.pl script flags this as an error:
"ERROR: do not use assignment in if condition"

Separate the assignment into its own statement before the conditional
check to improve code readability and adhere to the kernel's
coding standards.

Signed-off-by: default avatarDarshan Rathod <darshanrathod475@gmail.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans de Goede <hansg@kernel.org>
Signed-off-by: default avatarHans Verkuil <hverkuil+cisco@kernel.org>
parent ecba852d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment