[PATCH] fs/smbfs/request.c: turn NULL dereference into BUG()
In a case documented as
We should never be called with any of these states
BUG() in a case that would later result in a NULL pointer dereference.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c
index 2d85dd7..a0f296d 100644
--- a/fs/smbfs/request.c
+++ b/fs/smbfs/request.c
@@ -786,8 +786,7 @@
/* We should never be called with any of these states */
case SMB_RECV_END:
case SMB_RECV_REQUEST:
- server->rstate = SMB_RECV_END;
- break;
+ BUG();
}
if (result < 0) {