From patchwork Thu Sep 16 18:12:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 64989 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 A7F0BB70D6 for ; Fri, 17 Sep 2010 04:13:17 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406Ab0IPSNL (ORCPT ); Thu, 16 Sep 2010 14:13:11 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:36310 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753612Ab0IPSNK (ORCPT ); Thu, 16 Sep 2010 14:13:10 -0400 Received: by pwi3 with SMTP id 3so495067pwi.19 for ; Thu, 16 Sep 2010 11:13: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=zaNLRo+Zfj0HrU2CGj7p842vOVFGKM9UhzIYIbR4t1I=; b=E1t22gKzspDr6KoU7FkYc7vUK9u0yDIaEvpeKvChcWTwV6XgUpNmbvq1TsccesBaF7 DiJ1VLLmEJyRfZ9+uX+5RJyBlOrXXTvv2zTfShQEiykaOYj5985gDqbr6I+c1dc2u/bW lVdKebXWvlrspfUIHyROtcSkwO9TQ2sRDjmIE= 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=wKDf0SBnm1vzB7d/3LLJQKUEbi8cZA10oHUIYM8Ss9aweigOx7yqOcty4TKDVVqpte FYwQRMyCsYHZSqWItO1NwrjjqWFqCwwx7GHbcr8OCQs6BW7Ow1jCY57gwjeaiItMUFaF t61bbxKm8QNvPq4Nso8+fMUHuPg3V5Fp53hR0= Received: by 10.114.39.9 with SMTP id m9mr4087378wam.197.1284660789123; Thu, 16 Sep 2010 11:13:09 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id o17sm4843732wal.21.2010.09.16.11.13.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Sep 2010 11:13:07 -0700 (PDT) Date: Thu, 16 Sep 2010 20:12:55 +0200 From: Dan Carpenter To: Arnaldo Carvalho de Melo Cc: "David S. Miller" , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] net/llc: storing negative error codes in unsigned short Message-ID: <20100916181155.GB7867@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If the alloc_skb() fails then we return 65431 instead of -ENOBUFS (-105). Signed-off-by: Dan Carpenter --- 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/net/llc/llc_station.c b/net/llc/llc_station.c index e4dae02..cf4aea3 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c @@ -689,7 +689,7 @@ static void llc_station_rcv(struct sk_buff *skb) int __init llc_station_init(void) { - u16 rc = -ENOBUFS; + int rc = -ENOBUFS; struct sk_buff *skb; struct llc_station_state_ev *ev;