[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <578DA00B.2070207@roeck-us.net>
Date: Mon, 18 Jul 2016 20:35:39 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>,
linux-hwmon@...r.kernel.org, Jean Delvare <jdelvare@...e.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before
the function call "iio_channel_release"
On 07/18/2016 11:54 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Mon, 18 Jul 2016 20:34:41 +0200
>
> The iio_channel_release() function tests whether its argument is NULL
> and then returns immediately. Thus the test around the call is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
A much better change would be to use devm_iio_channel_get() instead of
iio_channel_get(), and to remove ntc_iio_channel_release() completely.
Guenter
Powered by blists - more mailing lists