diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2014-09-11 18:52:49 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-09-11 19:15:54 +0200 |
commit | fe00bcbf8a124980a38ce395ed6422d41be17374 (patch) | |
tree | 9debb668feb6549079dd3965029180d8e4e9f56d /drivers/usb/gadget | |
parent | usb: gadget: f_fs: add ioctl returning ep descriptor (diff) | |
download | linux-fe00bcbf8a124980a38ce395ed6422d41be17374.tar.xz linux-fe00bcbf8a124980a38ce395ed6422d41be17374.zip |
usb: f_fs: replace BUG in dead-code with less serious WARN_ON
Even though the BUG() in __ffs_event_add is a dead-code, it is still
better to warn rather then crash the system if that code ever gets
executed.
Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index a345385a5abe..a86b0a231a8c 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -2337,7 +2337,8 @@ static void __ffs_event_add(struct ffs_data *ffs, break; default: - BUG(); + WARN(1, "%d: unknown event, this should not happen\n", type); + return; } { |