Skip to content
Commit 9ca39411 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Jonathan Cameron
Browse files

iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check



Since if there is no GPIO, nothing happens, replace devm_gpiod_get()
with devm_gpiod_get_optional().
Also add IS_ERR() to fix the missing-check warning.

Fixes: cee211f4 ("iio: amplifiers: ad8366: Add support for the ADA4961 DGA")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Acked-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent df16c33a
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