patch "iio: frequency: adf4350: disable reg and clk on error in" added to staging-next
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: frequency: adf4350: disable reg and clk on error in
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
From c8cc4cf60b000fb9f4b29bed131fb6cf1fe42d67 Mon Sep 17 00:00:00 2001
From: Yang Yingliang <[email protected]>
Date: Tue, 1 Jun 2021 22:26:05 +0800
Subject: iio: frequency: adf4350: disable reg and clk on error in
adf4350_probe()
Disable reg and clk when devm_gpiod_get_optional() fails in adf4350_probe().
--- drivers/iio/frequency/adf4350.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/iio/frequency/adf4350.c +4 -2
@@ -563,8 +563,10 @@ static int adf4350_probe(struct spi_device *spi) st->lock_detect_gpiod =devm_gpiod_get_optional (&spi->dev,NULL ,GPIOD_IN ); -if (IS_ERR (st->lock_detect_gpiod)) -return PTR_ERR (st->lock_detect_gpiod); +if (IS_ERR (st->lock_detect_gpiod)) { + ret =PTR_ERR (st->lock_detect_gpiod); + goto error_disable_reg; + }if (pdata->power_up_frequency) { ret =adf4350_set_freq (st, pdata->power_up_frequency);
Signature · 1 line
2.32.0