All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "iio:ad7266: Fix broken regulator error handling" has been added to the 4.6-stable tree
@ 2016-07-25  0:31 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-25  0:31 UTC (permalink / raw)
  To: broonie, gregkh, jic23; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    iio:ad7266: Fix broken regulator error handling

to the 4.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-ad7266-fix-broken-regulator-error-handling.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 6b7f4e25f3309f106a5c7ff42c8231494cf285d3 Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@kernel.org>
Date: Mon, 20 Jun 2016 13:53:32 +0100
Subject: iio:ad7266: Fix broken regulator error handling

From: Mark Brown <broonie@kernel.org>

commit 6b7f4e25f3309f106a5c7ff42c8231494cf285d3 upstream.

All regulator_get() variants return either a pointer to a regulator or an
ERR_PTR() so testing for NULL makes no sense and may lead to bugs if we
use NULL as a valid regulator. Fix this by using IS_ERR() as expected.

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/adc/ad7266.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iio/adc/ad7266.c
+++ b/drivers/iio/adc/ad7266.c
@@ -397,7 +397,7 @@ static int ad7266_probe(struct spi_devic
 	st = iio_priv(indio_dev);
 
 	st->reg = devm_regulator_get(&spi->dev, "vref");
-	if (!IS_ERR_OR_NULL(st->reg)) {
+	if (!IS_ERR(st->reg)) {
 		ret = regulator_enable(st->reg);
 		if (ret)
 			return ret;


Patches currently in stable-queue which might be from broonie@kernel.org are

queue-4.6/drm-fsl-dcu-use-flat-regmap-cache.patch
queue-4.6/iio-ad7266-fix-probe-deferral-for-vref.patch
queue-4.6/iio-ad7266-fix-broken-regulator-error-handling.patch
queue-4.6/iio-ad7266-fix-support-for-optional-regulators.patch
queue-4.6/regulator-qcom_smd-add-regulator-ops-for-pm8941-lnldo.patch
queue-4.6/regulator-qcom_smd-add-list_voltage-callback.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-25  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25  0:31 Patch "iio:ad7266: Fix broken regulator error handling" has been added to the 4.6-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.