Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446003

Re: [PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before the function call "iio_channel_release"

From Guenter Roeck <linux@roeck-us.net>
Newsgroups linux.kernel
Subject Re: [PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before the function call "iio_channel_release"
Date 2016-07-19 05:40 +0200
Message-ID <rWu2Z-73a-3@gated-at.bofh.it> (permalink)
References (13 earlier) <mSsDN-4wa-61@gated-at.bofh.it> <mSsDN-4wa-63@gated-at.bofh.it> <mSsDN-4wa-65@gated-at.bofh.it> <mSsDN-4wa-33@gated-at.bofh.it> <rWlVL-1wg-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 07/18/2016 11:54 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.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@users.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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before the  function call "iio_channel_release" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-18 21:00 +0200
  Re: [PATCH] hwmon-ntc_thermistor: Delete an unnecessary check before  the function call "iio_channel_release" Guenter Roeck <linux@roeck-us.net> - 2016-07-19 05:40 +0200

csiph-web