]> git.baikalelectronics.ru Git - kernel.git/commit
usb: hso: check for return value in hso_serial_common_create()
authorRustam Kovhaev <rkovhaev@gmail.com>
Tue, 28 Jul 2020 06:42:17 +0000 (23:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jul 2020 20:01:51 +0000 (13:01 -0700)
commit9f1d185a81ea7db304c5ade6dcea9b54ca19ee1a
tree04cf65ead3fe676c4df53d747f8a0cc433ce926e
parent8479a57847342a90ca4577f0dc07e5e3aeaf11d0
usb: hso: check for return value in hso_serial_common_create()

in case of an error tty_register_device_attr() returns ERR_PTR(),
add IS_ERR() check

Reported-and-tested-by: syzbot+67b2bd0e34f952d0321e@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=67b2bd0e34f952d0321e
Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c