kernel_optimize_test/drivers/net/bonding
Amitoj Kaur Chawla 6d9b6f424d bonding: Return correct error code
The return value of kzalloc on failure of allocation of memory should
be -ENOMEM and not -1.

Found using Coccinelle. A simplified version of the semantic patch
used is:

//<smpl>
@@
expression *e;
@@

e = kzalloc(...);
if (e == NULL) {
...
return
- -1
+ -ENOMEM
;
}
//</smpl>

The single call site only checks that the return value is not 0,
hence no change is required at the call site.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-02-11 09:43:25 -05:00
..
bond_3ad.c bonding: 3ad: allow to set ad_actor settings while the bond is up 2016-02-11 04:31:11 -05:00
bond_alb.c bonding: Return correct error code 2016-02-11 09:43:25 -05:00
bond_debugfs.c net: Move bonding headers under include/net 2014-11-10 13:27:49 -05:00
bond_main.c bonding: trivial: style fixes 2016-02-08 10:45:42 -05:00
bond_netlink.c bonding: add tlb_dynamic_lb netlink support 2015-07-31 15:35:55 -07:00
bond_options.c bonding: 3ad: allow to set ad_actor settings while the bond is up 2016-02-11 04:31:11 -05:00
bond_procfs.c bonding: Display LACP info only to CAP_NET_ADMIN capable user 2015-06-23 03:11:52 -07:00
bond_sysfs_slave.c bonding: export slave's partner_oper_port_state via sysfs and netlink 2015-06-15 16:40:24 -07:00
bond_sysfs.c bonding: make mii_status sysfs node consistent 2016-01-11 17:14:42 -05:00
bonding_priv.h net/bonding: Make DRV macros private 2015-04-26 22:59:53 -04:00
Makefile bonding: add sysfs /slave dir for bond slave devices. 2014-01-17 18:51:58 -08:00