From patchwork Mon Apr 26 10:10:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: cifs: change && to || Date: Mon, 26 Apr 2010 00:10:06 -0000 From: Dan Carpenter X-Patchwork-Id: 53729 Message-Id: <20100426101006.GQ29093@bicker> To: Steve French Cc: Jeff Layton , kernel-janitors@vger.kernel.org, samba-technical@lists.samba.org, Igor Mammedov , linux-cifs-client@lists.samba.org, Shirish Pargaonkar This is a typo, if pvolume_info were NULL it would oops. This function is used in clean up and error handling. The current code never passes a NULL pvolume_info, but it could pass a NULL *pvolume_info if the kmalloc() failed. Signed-off-by: Dan Carpenter diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d9566bf..85a35a4 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2262,7 +2262,7 @@ cleanup_volume_info(struct smb_vol **pvolume_info) { struct smb_vol *volume_info; - if (!pvolume_info && !*pvolume_info) + if (!pvolume_info || !*pvolume_info) return; volume_info = *pvolume_info;