From patchwork Wed Oct 30 11:42:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 3114271 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B91D39F43F for ; Wed, 30 Oct 2013 11:45:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A39BA20121 for ; Wed, 30 Oct 2013 11:45:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1131220204 for ; Wed, 30 Oct 2013 11:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753920Ab3J3LpY (ORCPT ); Wed, 30 Oct 2013 07:45:24 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:60652 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753302Ab3J3LpQ (ORCPT ); Wed, 30 Oct 2013 07:45:16 -0400 Received: by mail-ee0-f45.google.com with SMTP id e50so571778eek.32 for ; Wed, 30 Oct 2013 04:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xFrBCGk2w8MpWp2+1gwDNpERqYq+8SOEWKGJc6lwsNQ=; b=IxayN/9LHhGYi4UMaKViw4bTEes0yesAUAcP5LnbtLTSqUBf5nTYgoLyfsXsaVM+kn BwA2SPk9KjjTz1NdNd+M3qb6sCPpQb9bRoO0EGLFGPHMXO4wCLd6YRVgCuII0rWk4C8A 0+g8LFZ6w9Ga0hzmcjXdGyGqPcIRLFQMspKUI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xFrBCGk2w8MpWp2+1gwDNpERqYq+8SOEWKGJc6lwsNQ=; b=XATIYUb1x2N46JTCctrODUhGpXpnIPHQm1iQu3RnOaiCq7b9prdPwnFtUOlPC+R7XF l5EtPbuBK6Mkc1S3HlFytIo2xJ0O5g3zj58NbRJ1ugtK0hU+3bVXrwOXDjFP2yf2ELRB Iw1UZT5f5tCyBPzQ13ZiQr5j4IJ9zaRcFatuNLFEMGwW1yDJC40bFMtiUqumki+9dAL7 MWpQ9RNQEccyjXH2osM89Avfbz9ErCU3eZ/EP8DsADg0V5B8YznEeFAe4rQg/Vx6BVis 3h83KgZI1CbXDaw9RllOPoek6CnuHQkRQ611WY4/i8qNzOgCU6Af8E+oCcKuPSO6tyhK t5KA== X-Gm-Message-State: ALoCoQmoMdE2eF79AGm7GWQUVpMmtyD6byC6TMbLIK8hDD7ktHD6y5k9o270cnWXhxH1UlgAH0mw7/bHVm34AYRxcHstajMTlMmBqtkVq2xS6zWHAISkf24= X-Received: by 10.15.110.75 with SMTP id cg51mr4626168eeb.42.1383133515144; Wed, 30 Oct 2013 04:45:15 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id a6sm82510594eei.10.2013.10.30.04.45.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2013 04:45:14 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, greearb@candelatech.com, Michal Kazior Subject: [PATCH/RFT 06/12] ath10k: fix ath10k_ce_init() failpath Date: Wed, 30 Oct 2013 12:42:20 +0100 Message-Id: <1383133346-8135-7-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1383133346-8135-1-git-send-email-michal.kazior@tieto.com> References: <1383133346-8135-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make sure to put target back to sleep. This was a minor issue as it didn't really matter if we put target back to sleep at this point. It just looked wrong. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/ce.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 7a49cde..657e8f2 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -1077,7 +1077,7 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar, ce_state = ath10k_ce_init_state(ar, ce_id, attr); if (!ce_state) { ath10k_err("Failed to initialize CE state for ID: %d\n", ce_id); - return NULL; + goto out; } if (attr->src_nentries) { @@ -1086,7 +1086,8 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar, ath10k_err("Failed to initialize CE src ring for ID: %d (%d)\n", ce_id, ret); ath10k_ce_deinit(ce_state); - return NULL; + ce_state = NULL; + goto out; } } @@ -1096,15 +1097,16 @@ struct ath10k_ce_pipe *ath10k_ce_init(struct ath10k *ar, ath10k_err("Failed to initialize CE dest ring for ID: %d (%d)\n", ce_id, ret); ath10k_ce_deinit(ce_state); - return NULL; + ce_state = NULL; + goto out; } } /* Enable CE error interrupts */ ath10k_ce_error_intr_enable(ar, ctrl_addr); +out: ath10k_pci_sleep(ar); - return ce_state; }