1
0
Fork 0
alistair23-linux/drivers/gnss
Wei Yongjun f2f18147c7 gnss: sirf: fix error return code in sirf_probe()
commit 43d7ce70ae upstream.

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

This avoids a use-after-free in case the driver is later unbound.

Fixes: d2efbbd18b ("gnss: add driver for sirfstar-based receivers")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
[ johan: amend commit message; mention potential use-after-free ]
Cc: stable <stable@vger.kernel.org>	# 4.19
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-22 09:31:20 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile gnss: add driver for mediatek receivers 2019-02-15 16:54:38 +01:00
core.c *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
mtk.c gnss: add driver for mediatek receivers 2019-02-15 16:54:38 +01:00
serial.c serdev: make synchronous write return bytes written 2018-11-27 19:44:21 +01:00
serial.h gnss: add generic serial driver 2018-06-28 20:31:32 +09:00
sirf.c gnss: sirf: fix error return code in sirf_probe() 2020-06-22 09:31:20 +02:00
ubx.c gnss: ubx: add u-blox,neo-6m compatible 2019-04-04 12:46:19 +02:00