[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>
This commit is contained in:
Adrian Bunk 2005-11-07 00:59:23 -08:00 committed by Linus Torvalds
parent 6f08b72cdd
commit ccb6e363a6

View File

@ -786,8 +786,7 @@ int smb_request_recv(struct smb_sb_info *server)
/* We should never be called with any of these states */ /* We should never be called with any of these states */
case SMB_RECV_END: case SMB_RECV_END:
case SMB_RECV_REQUEST: case SMB_RECV_REQUEST:
server->rstate = SMB_RECV_END; BUG();
break;
} }
if (result < 0) { if (result < 0) {