[PATCH RESEND] gadgetfs: Initialize CHIP to NULL before UDC probe

2014-03-27 Thread Lubomir Rintel
Otherwise the value from the last probe would be retained that possibly is freed since (the UDC is removed) and therefore no longer relevant. Reproducible with the dummy UDC: modprobe dummy_hcd mount -t gadgetfs gadgetfs /dev/gadget umount /dev/gadget rmmod dummy_hcd mount -t gadgetfs

[PATCH RESEND] gadgetfs: Initialize CHIP to NULL before UDC probe

2014-03-27 Thread Lubomir Rintel
Otherwise the value from the last probe would be retained that possibly is freed since (the UDC is removed) and therefore no longer relevant. Reproducible with the dummy UDC: modprobe dummy_hcd mount -t gadgetfs gadgetfs /dev/gadget umount /dev/gadget rmmod dummy_hcd mount -t gadgetfs