USB fix for 6.6-rc2

Here is a single USB fix for a much-reported regression for 6.6-rc1.
 
 It resolves a crash in the typec debugfs code for many systems.  It's
 been in linux-next with no reported issues, and many people have
 reported it resolving their problem with 6.6-rc1.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZQWXNQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymxmwCcDS42Mt0fXkxsjzJy4KCNSCNEvcYAoJ/wfVw7
 K2NylIy78y0PEvO4i0H9
 =8qKC
 -----END PGP SIGNATURE-----

Merge tag 'usb-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fix from Greg KH:
 "Here is a single USB fix for a much-reported regression for 6.6-rc1.

  It resolves a crash in the typec debugfs code for many systems. It's
  been in linux-next with no reported issues, and many people have
  reported it resolving their problem with 6.6-rc1"

* tag 'usb-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: typec: ucsi: Fix NULL pointer dereference
This commit is contained in:
Linus Torvalds 2023-09-16 11:37:11 -07:00
commit cce67b6bed
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ void ucsi_debugfs_register(struct ucsi *ucsi)
void ucsi_debugfs_unregister(struct ucsi *ucsi)
{
if (IS_ERR_OR_NULL(ucsi) || !ucsi->debugfs)
return;
debugfs_remove_recursive(ucsi->debugfs->dentry);
kfree(ucsi->debugfs);
}