OSDN Git Service

USB: gadget: serial: Fix debugfs crash
authorArumuga Durai A <cadurai@codeaurora.org>
Thu, 5 May 2016 07:23:29 +0000 (12:53 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Fri, 15 Jul 2016 09:36:33 +0000 (02:36 -0700)
commit9ac17853930c9db6feafc80d50ac200eb67a71cc
tree248ebda158bd59081db185051af40ea94c4e2a32
parentaa958278d16faccd0cc79650b94ea6aa18d4131d
USB: gadget: serial: Fix debugfs crash

Serial function driver creates debugfs files even though ports
are not allocated. Fetching/reading those files without allocation
of ports leads to crash. Check port allocation before creating
the files.

Change-Id: I85b050a261cca6f961d5d9058efb8b7facf242ce
Signed-off-by: Arumuga Durai A <cadurai@codeaurora.org>
drivers/usb/gadget/function/u_serial.c