usb: gadget: f_ipc: Fix debugfs node null pointer dereference

When the device boots up but ipc is not present in the default
composition, then ipc_bind does not happen and ipc_dev->in and
ipc_dev->out are null. At this point, if debugfs node 'status' is
read, then it leads to null pointer dereference when endpoint
names are accessed.
Fix this by bailing out if the EPs have not been assigned yet.

Change-Id: If9ae92f922c9c8a4f337ba152b993b5ee2226f3c
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed