android_kernel_motorola_sm6225/drivers/gnss
Wei Yongjun 621dbec36b gnss: sirf: fix error return code in sirf_probe()
commit 43d7ce70ae43dd8523754b17f567417e0e75dbce 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:05:28 +02:00
..
core.c gnss: fix potential error pointer dereference 2018-07-16 12:48:07 +02:00
Kconfig gnss: add driver for sirfstar-based receivers 2018-06-28 20:32:51 +09:00
Makefile gnss: add driver for sirfstar-based receivers 2018-06-28 20:32:51 +09:00
serial.c gnss: serial: fix synchronous write timeout 2018-11-27 16:13:10 +01:00
serial.h
sirf.c gnss: sirf: fix error return code in sirf_probe() 2020-06-22 09:05:28 +02:00
ubx.c gnss: ubx: make struct ubx_gserial_ops static 2018-07-16 12:48:07 +02:00