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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOJe8K3H8+4SAyKEVd8-vjuTNUKcyApZJ1FSYeLCntYXTp6Ddg@mail.gmail.com>
Date:	Wed, 27 Mar 2013 18:55:27 +0400
From:	Denis Kirjanov <kda@...ux-powerpc.org>
To:	Wei Yongjun <weiyj.lk@...il.com>
Cc:	jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
	bruce.w.allan@...el.com, carolyn.wyborny@...el.com,
	donald.c.skidmore@...el.com, gregory.v.rose@...el.com,
	peter.p.waskiewicz.jr@...el.com, alexander.h.duyck@...el.com,
	john.ronciak@...el.com, tushar.n.dave@...el.com,
	stephen@...workplumber.org, akeem.g.abodunrin@...el.com,
	yongjun_wei@...ndmicro.com.cn, e1000-devel@...ts.sourceforge.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH] igb: fix error return code in igb_sysfs_init()

Wouldn't it be better to return EIO since i2c_new_device()  can fail
for many reasons...


On 3/27/13, Wei Yongjun <weiyj.lk@...il.com> wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
>  drivers/net/ethernet/intel/igb/igb_hwmon.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c
> b/drivers/net/ethernet/intel/igb/igb_hwmon.c
> index 0478a1a..3b750b2 100644
> --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
> +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
> @@ -208,6 +208,7 @@ int igb_sysfs_init(struct igb_adapter *adapter)
>  	if (client == NULL) {
>  		dev_info(&adapter->pdev->dev,
>  			"Failed to create new i2c device..\n");
> +		rc = -ENOMEM;
>  		goto exit;
>  	}
>  	adapter->i2c_client = client;
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ