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: <1404471245.14069.1.camel@AMDC1943>
Date:	Fri, 04 Jul 2014 12:54:05 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Javier Martinez Canillas <javier.martinez@...labora.co.uk>
Cc:	Lee Jones <lee.jones@...aro.org>, Mark Brown <broonie@...nel.org>,
	Mike Turquette <mturquette@...aro.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Alessandro Zummo <a.zummo@...ertech.it>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Doug Anderson <dianders@...omium.org>,
	Olof Johansson <olof@...om.net>,
	Tomeu Vizoso <tomeu.vizoso@...labora.com>,
	Yadwinder Singh Brar <yadi.brar01@...il.com>,
	Tushar Behera <trblinux@...il.com>,
	Andreas Farber <afaerber@...e.de>,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 06/23] mfd: max77686: Make error checking consistent

On piÄ…, 2014-07-04 at 11:55 +0200, Javier Martinez Canillas wrote:
> Error checking across the driver is mostly consistent besides
> a few exceptions, so change these exceptions for consistency.
> 
> Signed-off-by: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
> ---
>  drivers/mfd/max77686.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>

Best regards,
Krzysztof


> diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c
> index ada4976..87fe52e 100644
> --- a/drivers/mfd/max77686.c
> +++ b/drivers/mfd/max77686.c
> @@ -134,7 +134,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
>  
>  	max77686 = devm_kzalloc(&i2c->dev,
>  				sizeof(struct max77686_dev), GFP_KERNEL);
> -	if (max77686 == NULL)
> +	if (!max77686)
>  		return -ENOMEM;
>  
>  	i2c_set_clientdata(i2c, max77686);
> @@ -153,8 +153,8 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
>  		return ret;
>  	}
>  
> -	if (regmap_read(max77686->regmap,
> -			 MAX77686_REG_DEVICE_ID, &data) < 0) {
> +	ret = regmap_read(max77686->regmap, MAX77686_REG_DEVICE_ID, &data);
> +	if (ret < 0) {
>  		dev_err(max77686->dev,
>  			"device not found on this channel (this is not an error)\n");
>  		return -ENODEV;
> @@ -180,7 +180,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
>  				  IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
>  				  IRQF_SHARED, 0, &max77686_irq_chip,
>  				  &max77686->irq_data);
> -	if (ret != 0) {
> +	if (ret) {
>  		dev_err(&i2c->dev, "failed to add PMIC irq chip: %d\n", ret);
>  		goto err_unregister_i2c;
>  	}
> @@ -188,7 +188,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c,
>  				  IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
>  				  IRQF_SHARED, 0, &max77686_rtc_irq_chip,
>  				  &max77686->rtc_irq_data);
> -	if (ret != 0) {
> +	if (ret) {
>  		dev_err(&i2c->dev, "failed to add RTC irq chip: %d\n", ret);
>  		goto err_del_irqc;
>  	}

--
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