From patchwork Mon Oct 25 05:02:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 266132 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9P53Cnq005849 for ; Mon, 25 Oct 2010 05:03:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751268Ab0JYFDL (ORCPT ); Mon, 25 Oct 2010 01:03:11 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:57861 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014Ab0JYFDK (ORCPT ); Mon, 25 Oct 2010 01:03:10 -0400 Received: by wwe15 with SMTP id 15so3080920wwe.1 for ; Sun, 24 Oct 2010 22:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=GBlT9ufINi+QV8PW2u/hWWR9VfHmdvSqbEapq61VrFo=; b=tqVOITxI06G0Bo2Kwu3fpifOuUyx+7Vg3s0PGj+CISE5UbPT1HiAqx6jqk7MdferXQ 3PWi99YuhtrGhJIVeIM2iWnGDkfCQ8nQkOqD7g84tewIMevN9pum/n24fKRQlfhaSrQf ifV1KQhCdYpb/AyVCGdF2qp/+97rruLctx5nQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=iB9isz2wz+2K1k5T8QFQBIw+NKbM+4VyxbtuVVMWGXixBAyF27Crak1aW9t7IL/eea NQG4FLj6NlgzekwT8S9xtBz7+AXREO0APQVXWY6wReHM2SXXulhKvnT3sxNiaZmwJp0W lxpLonYficS7DSwPu9bw0TXyYjH01fn6iv1gU= Received: by 10.216.52.199 with SMTP id e49mr1001166wec.63.1287982989402; Sun, 24 Oct 2010 22:03:09 -0700 (PDT) Received: from bicker (h3f06.n1.ips.mtn.co.ug [41.210.191.6]) by mx.google.com with ESMTPS id o43sm3849757weq.47.2010.10.24.22.03.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 24 Oct 2010 22:03:08 -0700 (PDT) Date: Mon, 25 Oct 2010 07:02:56 +0200 From: Dan Carpenter To: Steve French Cc: Jeff Layton , Suresh Jayaraman , Shirish Pargaonkar , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, kernel-janitors@vger.kernel.org Subject: [patch] cifs: cifs_convert_address() returns zero on error Message-ID: <20101025050256.GX5985@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 25 Oct 2010 05:03:12 +0000 (UTC) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 7e73176..ad6a4ea 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1064,7 +1064,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);