remarkable-linux/net/nfc
Johan Hovold c45e3e4c5b NFC: fix device-allocation error return
A recent change fixing NFC device allocation itself introduced an
error-handling bug by returning an error pointer in case device-id
allocation failed. This is clearly broken as the callers still expected
NULL to be returned on errors as detected by Dan's static checker.

Fix this up by returning NULL in the event that we've run out of memory
when allocating a new device id.

Note that the offending commit is marked for stable (3.8) so this fix
needs to be backported along with it.

Fixes: 20777bc57c ("NFC: fix broken device allocation")
Cc: stable <stable@vger.kernel.org>	# 3.8
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-11-06 00:53:39 +01:00
..
hci net: nfc: hci: llc_shdlc: use setup_timer() helper. 2017-09-25 13:19:20 -07:00
nci License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
af_nfc.c net: socket: mark socket protocol handler structs as const 2017-05-16 11:54:07 -04:00
core.c NFC: fix device-allocation error return 2017-11-06 00:53:39 +01:00
digital.h
digital_core.c NFC: digital: Delete an error message for memory allocation failure 2017-06-23 00:14:12 +02:00
digital_dep.c NFC: digital: NFC-DEP Target WT(nfcdep,max) is now 14 2017-06-23 00:19:59 +02:00
digital_technology.c NFC: digital: NFC-A SEL_RES must be one byte 2017-06-23 00:19:59 +02:00
Kconfig
llcp.h
llcp_commands.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
llcp_core.c net: nfc: llcp_core: use setup_timer() helper. 2017-09-25 13:19:20 -07:00
llcp_sock.c NFC: Add sockaddr length checks before accessing sa_family in bind handlers 2017-06-23 00:38:31 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netlink.c nfc: Ensure presence of required attributes in the activate_target handler 2017-06-23 00:28:39 +02:00
nfc.h nfc: netlink: HCI event connectivity implementation 2015-12-29 19:06:20 +01:00
rawsock.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00