Skip to content
Commit 0bade8b5 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mauro Carvalho Chehab
Browse files

media: sta2x11: Use gpio_is_valid() and remove unnecessary check



Replace the manual validity checks for the GPIO with the
gpio_is_valid().

In vip_gpio_reserve(), Error checking for gpio pin is not correct.
If pwr_pin = -1, It will return 0. This should be return an error.

In sta2x11_vip_init_one(), Error checking for gpio 'reset_pin'
is unnecessary. Because vip_gpio_reserve() is also checking for
valid gpio pin. So removed extra error checking for gpio 'reset_pin'.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 03b76523
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment