mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 09:22:53 -04:00
Merge tag 'gpio-fixes-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: - fix a build error in gpio-vf610 - fix a null-pointer dereference in the GPIO character device code * tag 'gpio-fixes-for-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: cdev: fix null pointer dereference in linereq_free() gpio: vf610: fix compilation error
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
|
||||
#define VF610_GPIO_PER_PORT 32
|
||||
|
||||
|
||||
@@ -1460,11 +1460,12 @@ static ssize_t linereq_read(struct file *file,
|
||||
static void linereq_free(struct linereq *lr)
|
||||
{
|
||||
unsigned int i;
|
||||
bool hte;
|
||||
bool hte = false;
|
||||
|
||||
for (i = 0; i < lr->num_lines; i++) {
|
||||
hte = !!test_bit(FLAG_EVENT_CLOCK_HTE,
|
||||
&lr->lines[i].desc->flags);
|
||||
if (lr->lines[i].desc)
|
||||
hte = !!test_bit(FLAG_EVENT_CLOCK_HTE,
|
||||
&lr->lines[i].desc->flags);
|
||||
edge_detector_stop(&lr->lines[i], hte);
|
||||
if (lr->lines[i].desc)
|
||||
gpiod_free(lr->lines[i].desc);
|
||||
|
||||
Reference in New Issue
Block a user