From: Adrian Bunk Date: Mon, 7 Nov 2005 08:59:23 +0000 (-0800) Subject: [PATCH] fs/smbfs/request.c: turn NULL dereference into BUG() X-Git-Tag: v2.6.15-rc1~626 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccb6e363a68144cdfdaa6d964d63d620c8ac9a9b;p=linux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index 2d85dd7415..a0f296d992 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c @@ -786,8 +786,7 @@ int smb_request_recv(struct smb_sb_info *server) /* 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) {