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>
This commit is contained in:
Michal Nazarewicz 2014-09-11 18:52:49 +02:00 committed by Felipe Balbi
parent c559a35341
commit fe00bcbf8a
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
{