cifs: fix inverted NULL check after kmalloc
authorJeff Layton <jlayton@redhat.com>
Wed, 24 Sep 2008 18:55:51 +0000 (14:55 -0400)
committerSteve French <sfrench@us.ibm.com>
Wed, 24 Sep 2008 18:55:11 +0000 (18:55 +0000)
cifs: fix inverted NULL check after kmalloc

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c

index 82612be9477b7ab69b2f5159b1a501f4bb62e0a9..079f39a8dd3be5c68aad273cb7bbf8729022e3ae 100644 (file)
@@ -1274,7 +1274,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
                        info_buf_source =
                                kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO),
                                                GFP_KERNEL);
-                       if (info_buf_source != NULL)
+                       if (info_buf_source == NULL)
                                goto unlink_target;
 
                        info_buf_target = info_buf_source + 1;