From patchwork Fri Dec 24 05:17:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 76608 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9D9FBB70D4 for ; Fri, 24 Dec 2010 16:17:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751165Ab0LXFRt (ORCPT ); Fri, 24 Dec 2010 00:17:49 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:44229 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032Ab0LXFRr (ORCPT ); Fri, 24 Dec 2010 00:17:47 -0500 Received: by fxm20 with SMTP id 20so7671458fxm.19 for ; Thu, 23 Dec 2010 21:17:46 -0800 (PST) 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=DFEX8ZsGlyYr0XbAsAqFWrq+RvjdSbOiXX2JkA3tFeI=; b=PID+tjuDtM4fEXxnHjsaamesYeuk0aFVMgqnbjuiCfOwQAALAoZbGsowxNCVj5wp9d Ycsw+kDrUbYorHJxEeDa6MZnQYWdeS+htO9xYEkp/MpFcbrSGZZlbiiQMf68aZA1nPIM tVBOMewxCvCaM8me4J905/IrUXmQ/LdUxroco= 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=vzNQYlgwTRAMQsquv5lJ2Rms69HvRWK54OyuxXcqXFOGCttSctgDlqVN4ptqr+IrRv sJjStWNDWO+4niV+IJL47aKUoXxCu506UMh4B1WLkj8JUZDqfuZ4tpr2LV0Y8a9jSvI8 NGp54f7Vchafjrpl/Fzv9VlWc3K8uwg6VEVm4= Received: by 10.223.101.141 with SMTP id c13mr2337711fao.118.1293167866069; Thu, 23 Dec 2010 21:17:46 -0800 (PST) Received: from bicker (h2d62.n1.ips.mtn.co.ug [41.210.173.98]) by mx.google.com with ESMTPS id y3sm2190470fai.14.2010.12.23.21.17.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Dec 2010 21:17:44 -0800 (PST) Date: Fri, 24 Dec 2010 08:17:34 +0300 From: Dan Carpenter To: netdev@vger.kernel.org Cc: Jiri Pirko , Eric Dumazet , H Hartley Sweeten , "David S. Miller" , kernel-janitors@vger.kernel.org Subject: [patch] skfp: testing the wrong variable in skfp_driver_init() Message-ID: <20101224051734.GO1936@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The intent here was to test if the allocation failed but we tested "SharedMemSize" instead of "SharedMemAddr" by mistake. Signed-off-by: Dan Carpenter Reviewed-by: Jiri Pirko --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 0a66fed..16c6265 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c @@ -412,7 +412,7 @@ static int skfp_driver_init(struct net_device *dev) bp->SharedMemAddr = pci_alloc_consistent(&bp->pdev, bp->SharedMemSize, &bp->SharedMemDMA); - if (!bp->SharedMemSize) { + if (!bp->SharedMemAddr) { printk("could not allocate mem for "); printk("hardware module: %ld byte\n", bp->SharedMemSize);