diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-20 12:00:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-20 12:00:30 +0300 |
commit | 35eaa42c4a1017c08d0572008db375becb621744 (patch) | |
tree | 8185b6d18acfc63285e3132c9039c7d6c9a90527 /net/nfc | |
parent | 4b95391c8ef0f270ed58234597aef58976abe01c (diff) | |
parent | a7904a538933c525096ca2ccde1e60d0ee62c08e (diff) | |
download | linux-35eaa42c4a1017c08d0572008db375becb621744.tar.xz |
Merge 5.16-rc6 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/netlink.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 334f63c9529e..f184b0db79d4 100644 --- a/net/nfc/netlink.c +++ b/net/nfc/netlink.c @@ -636,8 +636,10 @@ static int nfc_genl_dump_devices_done(struct netlink_callback *cb) { struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0]; - nfc_device_iter_exit(iter); - kfree(iter); + if (iter) { + nfc_device_iter_exit(iter); + kfree(iter); + } return 0; } @@ -1392,8 +1394,10 @@ static int nfc_genl_dump_ses_done(struct netlink_callback *cb) { struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0]; - nfc_device_iter_exit(iter); - kfree(iter); + if (iter) { + nfc_device_iter_exit(iter); + kfree(iter); + } return 0; } |