Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp323729yba; Sat, 4 May 2019 03:12:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLBnkfTPyrNzWgUdojWYRKF9JW7DTf8Pp7l1z7Jway0qYqMdoL7kES2/5J8mg9DxwNajCX X-Received: by 2002:a63:ca0b:: with SMTP id n11mr16129990pgi.442.1556964726673; Sat, 04 May 2019 03:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556964726; cv=none; d=google.com; s=arc-20160816; b=SV2239rxLmVMaVA1h2TxyMBJTtmgq15Dcw7Au9lFpNXyKlrMk/dC6yWstYNs0Hr+Tz +MVROyci3zXnXOgMHHk5VOfWhGEU2YKcfRWvpVQ6e7o7z6PYMMQ5YE+SzH+u0YrxAHXT faSEISLJ8dwZwRNQ47WTC9+HwKZS35Z6yBVy3PcN/jOhf3g7L/JytZzuZ3QslwDKEFyD sbCdKmcC2d1/L4fKUINUUPvy7m7NcNPlcvsfFMKTi1pzkhIpgEP/xQt+Kn/OixFRjOf/ 8FmIwy1/e3QBUvBC98s8RwdvgmVDXi+97pjK1IQBhO5ydGswTy+g/F1/1cJg7uOPmXnS d4KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=WtljU9VToTYo8/FnSPzYs4PaGQxXjF45f7gWSItjexo=; b=jCh2RZltPHqcr8OdbvMl8g0FCy6EHkRdskUozAup//F3iKjGX6ftmSjP8O07hFPoy0 M+tD3ErrTDYpzCwkpQhdiPnx39aqWPlwOzgvPJHgEY2R7vnG/rPfW2Jr/Wz4QtQb4UY/ 7rdkUYSDg2LcfJ/oS3cIl9KpOaNWIy3Dys2h3GdF08omqPY84ric5RMbN510R2M22CsU mMhouj3Iz47x1hcPd785bVJ8aTCXRgyNNxz5DFhaHuu9AWaPPsg+rihIFop70ZeNdZL3 dgK6L7jmbeB9/UdMS3ymEQpyp/Q92vuQ3OnGvTnhLPtT4kVXkQWVFVBLpcRuTaWbnWjj K4Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uezVEqpT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si7118221plf.90.2019.05.04.03.11.50; Sat, 04 May 2019 03:12:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uezVEqpT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbfEDKIY (ORCPT + 99 others); Sat, 4 May 2019 06:08:24 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43954 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfEDKIX (ORCPT ); Sat, 4 May 2019 06:08:23 -0400 Received: by mail-pg1-f195.google.com with SMTP id t22so3952795pgi.10; Sat, 04 May 2019 03:08:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WtljU9VToTYo8/FnSPzYs4PaGQxXjF45f7gWSItjexo=; b=uezVEqpTS7R5exHUJZd+k/vahlPQ/GxwBMvWkTXvH8408RduT9Z9SuEi2+MZ6JuThG s+za/oGHOUsOco2Y71Sy64prIH61vmdgArRHXiDVuLsiVghrfcvLt/AZFAnkeEiq/Itv x/FFC1nF5f1l+SPVr34F/rZSnPOC/3Xiv8l2SaIiD2BQKSdg8Aay1uuUVt9E3tT5uXLa 3CAA/GDg1XOYv2Q/qDS+sA32lZNOtez+u8Twz8cb00wCj7Dfo/EuzRcRBpJqzDtz6Or6 HMi0br1PQ29S3hXehG58adHnvxud/mos0rAaLI8b8Gze9L6mwnhJWb1KxtawBSxE88ss AMBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WtljU9VToTYo8/FnSPzYs4PaGQxXjF45f7gWSItjexo=; b=I29Fdt5CL6vNhVuieToxkjCdShazT1XM5cVLNLFgi3tXfGwJlQg6FuNlyVgWy6+Txs 2uI1kTXWFNLHmfRkoro226IGrPx9mMpyU9z8OYHW/s+HtZRfMm53BrxN6SHrE42fN5mS c0kcx5Rz8fDLFMg6/6c7gUS3AzCoQv0SadNeLfcOM7urbrbNJNJi6ofKAiojhQoL/Sao deMJBgz11W4/HDhnzvq5GVSxM/mg4FKibPoVqZGR/IC8OLlyoWKWLB92ic+Wi7B3ly2L Ic1082MUvN71tuUXDKJiKWXX0gESfwprIKL7+8F9qEnKNT/iZyt2Rv2MaYkUizuHqKQq 3P+Q== X-Gm-Message-State: APjAAAUeKdI9yC7dLAmFX2SwXeXy1WM15nJrB59mMQKzRwaeRxwxHv+v tKuRhom9kZdgN9M20lj2vmY= X-Received: by 2002:a63:90c7:: with SMTP id a190mr17995325pge.23.1556964502977; Sat, 04 May 2019 03:08:22 -0700 (PDT) Received: from oslab.tsinghua.edu.cn ([2402:f000:4:72:808::3ca]) by smtp.gmail.com with ESMTPSA id a26sm4221622pfl.177.2019.05.04.03.08.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 May 2019 03:08:22 -0700 (PDT) From: Jia-Ju Bai To: ath9k-devel@qca.qualcomm.com, kvalo@codeaurora.org, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] net: wireless: ath9k: Return an error when ath9k_hw_reset() fails Date: Sat, 4 May 2019 18:08:15 +0800 Message-Id: <20190504100815.19876-1-baijiaju1990@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ath9k_hw_reset() in ath9k_start() can fail, and in this case, ath9k_start() should return an error instead of executing the subsequent code. Signed-off-by: Jia-Ju Bai --- drivers/net/wireless/ath/ath9k/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index f23cb2f3d296..f78e7c46764d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -681,6 +681,7 @@ static int ath9k_start(struct ieee80211_hw *hw) "Unable to reset hardware; reset status %d (freq %u MHz)\n", r, curchan->center_freq); ah->reset_power_on = false; + return r; } /* Setup our intr mask. */ -- 2.17.0