From patchwork Sun Dec 27 14:10:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: roel kluin X-Patchwork-Id: 41847 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 C11F4B7BF0 for ; Mon, 28 Dec 2009 01:08:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbZL0OIL (ORCPT ); Sun, 27 Dec 2009 09:08:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752019AbZL0OIL (ORCPT ); Sun, 27 Dec 2009 09:08:11 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:34889 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997AbZL0OIK (ORCPT ); Sun, 27 Dec 2009 09:08:10 -0500 Received: by ewy19 with SMTP id 19so1161237ewy.21 for ; Sun, 27 Dec 2009 06:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=tEHjQDXw6qpk6Fqgq6VM33CRdij+tFetzkoOW2gYuo0=; b=CvTwdT1NX8xyJ0rR74Tz+OE2rXMyQ8Sb+ojctkeZvG8fqCffz+08EgKHYsY/WH9DCe cRlRCFxKuFrumGmxh50nsc9vPdB5nk6IwNNQG2/hVRNR+1tggcdDW1n4dRhu6+a16FXE kYNjSew8I1xCx7dPZs1bPbPFlnEoWxJGABigA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Pv59ecpFBEgcKWqu0eaWM919cabiIpa1JFnqPANSIZixvgmQNElNdefW6fmG04ue9O 81uhs/oHc87/yFoAlaMU5qzLceV02SO+/yThHKsTnaQ6tbWOBUBBSDl3aT4PGkJ1bdk8 Jjxk0u1GPosJFGVYDOhuDuBBJlrkZI2I6dPi4= Received: by 10.213.15.4 with SMTP id i4mr10093251eba.80.1261922887041; Sun, 27 Dec 2009 06:08:07 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 10sm22478968eyz.31.2009.12.27.06.08.06 (version=SSLv3 cipher=RC4-MD5); Sun, 27 Dec 2009 06:08:06 -0800 (PST) Message-ID: <4B376AF3.6090408@gmail.com> Date: Sun, 27 Dec 2009 15:10:59 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: netdev@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] niu: timeout ignored in tcam_wait_bit() Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org With `while (--limit > 0)' i reaches 0 after the loop, so upon timeout the error was not returned. Signed-off-by: Roel Kluin --- -- 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/niu.c b/drivers/net/niu.c index 8ce58c4..2aed2b3 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -2844,7 +2844,7 @@ static int tcam_wait_bit(struct niu *np, u64 bit) break; udelay(1); } - if (limit < 0) + if (limit <= 0) return -ENODEV; return 0;