Kent Gibson c8e27a4a51 gpiolib: cdev: fix null pointer dereference in linereq_free()
Fix a kernel NULL pointer dereference reported by gpio kselftests.

linereq_free() can be called as part of the cleanup of a failed request,
at which time the desc for a line may not have been determined, so it
is unsafe to dereference without a check.

Add a check prior to dereferencing the line desc.

Fixes: 2068339a6c35 ("gpiolib: cdev: Add hardware timestamp clock type")
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-07 12:18:18 +02:00
..
2022-01-11 12:31:35 -08:00
2021-04-14 10:19:22 +01:00
2021-05-05 16:07:41 +02:00
2022-06-23 23:18:13 +02:00
2022-06-03 20:01:25 -07:00
2022-06-06 14:09:16 +03:00
2022-05-26 14:51:38 -07:00
2022-04-01 10:26:09 -07:00
2021-11-08 11:55:21 -08:00
2022-01-14 18:50:52 -05:00
2019-12-09 10:40:18 +01:00
2022-06-05 09:12:28 -07:00
2022-06-05 09:12:28 -07:00