cifs: cifs_convert_address() returns zero on error
authorDan Carpenter <error27@gmail.com>
Mon, 25 Oct 2010 05:02:56 +0000 (07:02 +0200)
committerSteve French <sfrench@us.ibm.com>
Tue, 26 Oct 2010 18:22:38 +0000 (18:22 +0000)
The cifs_convert_address() returns zero on error but this caller is
testing for negative returns.

Btw. "i" is unsigned here, so it's never negative.

Reviewed-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c

index c5807d39dced2413ca8808cd8590cc26140c6476..dd9a4ae1d21d8ca3e925ea989e5caa96de9b3074 100644 (file)
@@ -1067,7 +1067,7 @@ cifs_parse_mount_options(char *options, const char *devname,
                        }
                        i = cifs_convert_address((struct sockaddr *)&vol->srcaddr,
                                                 value, strlen(value));
-                       if (i < 0) {
+                       if (i == 0) {
                                printk(KERN_WARNING "CIFS:  Could not parse"
                                       " srcaddr: %s\n",
                                       value);