From patchwork Thu Nov 26 15:08:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 63182 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAQF91TT018350 for ; Thu, 26 Nov 2009 15:09:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760629AbZKZPIy (ORCPT ); Thu, 26 Nov 2009 10:08:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760628AbZKZPIy (ORCPT ); Thu, 26 Nov 2009 10:08:54 -0500 Received: from smtp.nokia.com ([192.100.122.233]:23592 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760575AbZKZPIx (ORCPT ); Thu, 26 Nov 2009 10:08:53 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nAQF8lWc012213; Thu, 26 Nov 2009 17:08:54 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 26 Nov 2009 17:08:48 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 26 Nov 2009 17:08:48 +0200 Received: from [127.0.1.1] (essapo-nirac252122.europe.nokia.com [10.162.252.122]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id nAQF8ju1015055; Thu, 26 Nov 2009 17:08:45 +0200 Subject: [PATCH 03/12] wl1251: fix error handling in wl1251_op_config() To: linville@tuxdriver.com From: Kalle Valo Cc: linux-wireless@vger.kernel.org Date: Thu, 26 Nov 2009 17:08:43 +0200 Message-ID: <20091126150843.917.6633.stgit@tikku> In-Reply-To: <20091126150141.917.35278.stgit@tikku> References: <20091126150141.917.35278.stgit@tikku> User-Agent: StGit/0.15 MIME-Version: 1.0 X-OriginalArrivalTime: 26 Nov 2009 15:08:48.0467 (UTC) FILETIME=[5B0EC230:01CA6EAA] X-Nokia-AV: Clean Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index e9fb2ca..8ba6742 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c @@ -641,20 +641,25 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) * through the bss_info_changed() hook. */ ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE); + if (ret < 0) + goto out_sleep; } else if (!(conf->flags & IEEE80211_CONF_PS) && wl->psm_requested) { wl1251_debug(DEBUG_PSM, "psm disabled"); wl->psm_requested = false; - if (wl->psm) + if (wl->psm) { ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); + if (ret < 0) + goto out_sleep; + } } if (conf->power_level != wl->power_level) { ret = wl1251_acx_tx_power(wl, conf->power_level); if (ret < 0) - goto out; + goto out_sleep; wl->power_level = conf->power_level; }