lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201307151624.57438.marex@denx.de>
Date:	Mon, 15 Jul 2013 16:24:57 +0200
From:	Marek Vasut <marek.vasut@...il.com>
To:	Otavio Salvador <otavio@...ystems.com.br>
Cc:	Jonathan Cameron <jic23@...nel.org>, linux-kernel@...r.kernel.org,
	Jonathan Cameron <jic23@....ac.uk>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	Bill Pemberton <wfp5p@...ginia.edu>,
	"Lars-Peter Clausen" <lars@...afoo.de>, linux-iio@...r.kernel.org,
	devel@...verdev.osuosl.org
Subject: Re: [PATCH 2/5] ARM: mxs-lradc: Simplify mxs_lradc_trigger_init error handle

Dear Otavio Salvador,

> As we have a 'ret' variable with the iio_trigger_register return, this
> can be used as result.
> 
> Signed-off-by: Otavio Salvador <otavio@...ystems.com.br>
> ---
>  drivers/staging/iio/adc/mxs-lradc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
> b/drivers/staging/iio/adc/mxs-lradc.c index d92c97a..6d41846 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -671,14 +671,12 @@ static int mxs_lradc_trigger_init(struct iio_dev
> *iio) trig->ops = &mxs_lradc_trigger_ops;
> 
>  	ret = iio_trigger_register(trig);
> -	if (ret) {
> +	if (ret)
>  		iio_trigger_free(trig);
> -		return ret;
> -	}
> 
>  	iio->trig = trig;


You are still setting iio->trig , you dont want to do that in case of failure

> -	return 0;
> +	return ret;
>  }
> 
>  static void mxs_lradc_trigger_remove(struct iio_dev *iio)

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ