Return-path: Received: from mms3.broadcom.com ([216.31.210.19]:1559 "EHLO MMS3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542Ab0IKB3n (ORCPT ); Fri, 10 Sep 2010 21:29:43 -0400 From: "Brett Rudley" To: "Ben Hutchings" , "Greg Kroah-Hartman" cc: "Henry Ptasinski" , "Nohee Ko" , "linux-wireless@vger.kernel.org" Date: Fri, 10 Sep 2010 18:29:26 -0700 Subject: RE: [PATCH] brcm80211: Fix some initialisation failure paths Message-ID: <7A94256FD72B884D9E7C55586C3CBCEE12BE49E77A@SJEXCHCCR01.corp.ad.broadcom.com> References: <1284079098.5323.595.camel@localhost> In-Reply-To: <1284079098.5323.595.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: T3VyIGZpcnN0IHBhdGNoISAgTG9va3MgZ29vZCwgdGhhbmtzLg0KDQpCcmV0dA0KDQo+IC0tLS0t T3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IEJlbiBIdXRjaGluZ3MgW21haWx0bzpiZW5A ZGVjYWRlbnQub3JnLnVrXQ0KPiBTZW50OiBUaHVyc2RheSwgU2VwdGVtYmVyIDA5LCAyMDEwIDU6 MzggUE0NCj4gVG86IEdyZWcgS3JvYWgtSGFydG1hbg0KPiBDYzogQnJldHQgUnVkbGV5OyBIZW5y eSBQdGFzaW5za2k7IE5vaGVlIEtvOyBsaW51eC0NCj4gd2lyZWxlc3NAdmdlci5rZXJuZWwub3Jn DQo+IFN1YmplY3Q6IFtQQVRDSF0gYnJjbTgwMjExOiBGaXggc29tZSBpbml0aWFsaXNhdGlvbiBm YWlsdXJlIHBhdGhzDQo+IA0KPiBJbml0aWFsaXNlIHdsX2luZm86OnRhc2tsZXQgZWFybHkgc28g dGhhdCBpdCdzIHNhZmUgdG8NCj4gdGFza2xldF9raWxsKCkNCj4gaXQgaW4gd2xfZnJlZSgpLg0K PiANCj4gU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