linux-stable/drivers/net/hamradio
Amitoj Kaur Chawla 37ace20a3c dmascc: Return correct error codes
This change has been made with the goal that kernel functions should
return something more descriptive than -1 on failure.

A variable `err` has been introduced for storing error codes.

The return value of kzalloc on failure should return a -1 and not a
-ENOMEM. This was found using Coccinelle. A simplified version of
the semantic patch used is:

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

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

Furthermore, set `err` to -ENOMEM on failure of alloc_netdev(), and to
-ENODEV on failure of register_netdev() and probe_irq_off().

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-16 15:32:34 -05:00
..
6pack.c 6pack: fix free memory scribbles 2016-01-06 01:25:01 -05:00
baycom_epp.c x86/asm/tsc: Rename native_read_tsc() to rdtsc() 2015-07-06 15:23:28 +02:00
baycom_par.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
baycom_ser_fdx.c net: hamradio: baycom_ser_fdx: Replace timeval with timespec64 2016-02-11 09:54:54 -05:00
baycom_ser_hdx.c hamradio: baycom: remove deprecated IRQF_DISABLED 2013-09-30 15:08:13 -04:00
bpqether.c NET: hamradio: Fix IP over bpq encapsulation. 2015-07-08 14:09:03 -07:00
dmascc.c dmascc: Return correct error codes 2016-02-16 15:32:34 -05:00
hdlcdrv.c ax25: Stop using magic neighbour cache operations. 2015-03-03 14:44:41 -05:00
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile
mkiss.c mkiss: fix scribble on freed memory 2016-01-06 15:06:27 -05:00
scc.c ax25: Stop using magic neighbour cache operations. 2015-03-03 14:44:41 -05:00
yam.c ax25: Stop using magic neighbour cache operations. 2015-03-03 14:44:41 -05:00
z8530.h