From patchwork Tue Aug 24 12:07:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 126391 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7OC89OH004892 for ; Tue, 24 Aug 2010 12:08:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764Ab0HXMIG (ORCPT ); Tue, 24 Aug 2010 08:08:06 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:38122 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507Ab0HXMIF (ORCPT ); Tue, 24 Aug 2010 08:08:05 -0400 Received: by eyg5 with SMTP id 5so3267859eyg.19 for ; Tue, 24 Aug 2010 05:08:03 -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=LdO77GcbUg65NHr7ULGmOmvTcUGJDS7WfiPY4gK92po=; b=pCNS81xvDp5UkMJimGNKtRYiuYj3aN2uZy7O2dDoKu9U0KETPoY1P818//b6kyy7hV 3Io5bYGLNrwJzYehFuLNhzLVMvBxEWQVQdx/hkvWS2nQ1eqREwBB5ueyNG/NPTj44pvN XKoG0z2UN6cXKmleF+7J7cLscroOKGMCl/bFk= 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=uxsjpm/q6gq9fTshqG6JNiyOQZTyobNnC0mlMPF481tx1ej0YJTWKh9EyztM4sbgC1 VW7iVQDOXWCf/RA7vhMeH30/Y+4RK6iYDFEYXHtVStX8W71qeyuNNFbFWWNbWyGszhko U0/STgkEpshne2T5tln2hOqBCyzxwnucYBYyo= Received: by 10.213.10.68 with SMTP id o4mr685079ebo.31.1282651683672; Tue, 24 Aug 2010 05:08:03 -0700 (PDT) Received: from bicker ([41.222.20.69]) by mx.google.com with ESMTPS id a48sm23940eei.19.2010.08.24.05.07.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Aug 2010 05:08:02 -0700 (PDT) Date: Tue, 24 Aug 2010 14:07:43 +0200 From: Dan Carpenter To: Dan Williams Cc: "John W. Linville" , Ben Hutchings , Mike Frysinger , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [rfc patch] libertas: fix if_spi_prog_helper_firmware() Message-ID: <20100824120743.GG29330@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 24 Aug 2010 12:08:10 +0000 (UTC) diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index fe3f080..123a541 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c @@ -471,9 +471,12 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card) goto release_firmware; err = spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_CMD_DOWNLOAD_OVER); + if (err) goto release_firmware; - lbs_deb_spi("waiting for helper to boot...\n"); + lbs_deb_spi("helper firmware loaded...\n"); + + return 0; release_firmware: release_firmware(firmware);