avctp: Fix EINVAL on uinput creation
authorHaochen Tong <i@hexchain.org>
Sun, 12 Jan 2020 00:42:26 +0000 (01:42 +0100)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:48 +0000 (14:30 +0530)
commitdcf3cdda583707ecb797fefc45f8cccb09d2d8ce
tree275ee6b6da2293cb68a2c96ecc7d28adac6eb735
parent9145b3624f88a6580d33bb279f26495e563444b2
avctp: Fix EINVAL on uinput creation

The struct uinput_dev variable is on stack, so clear its content to
avoid accidentally writing garbage values to kernel. This fixes "Can't
create uinput device: Invalid argument (22)" in some cases.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/avctp.c