From patchwork Sat May 22 20:33:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 101675 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4MKXjBS025170 for ; Sat, 22 May 2010 20:33:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758216Ab0EVUdn (ORCPT ); Sat, 22 May 2010 16:33:43 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:46309 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755773Ab0EVUdm (ORCPT ); Sat, 22 May 2010 16:33:42 -0400 Received: by vws9 with SMTP id 9so1655533vws.19 for ; Sat, 22 May 2010 13:33:41 -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=5wYo9D6fX8/8HPt0qiXyH2xOpCDpV1mo5xMp0QMv184=; b=vdY4qYiXnzORR4eXvqorBaVIqcu8lqbWrBZ7N3GpX9/0WMC4TNaNX2t4te3WNC23KO VQJMClmpv+JKiG0xGLcRH/OvLppU/USKEOMeT0lWfPjbmbIkLRuEc9TGAxjVzwNcYly7 h1T3cSoj79kCOKgzKwtI4Uc4nBeLNoJ9gPdzE= 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=sbHbBdBx6E1048YRl3SFmh5Cjkn5SuX9FhvUv7zka0e5qD8u+gzI/7FGSr6HXvO9px /6R7RkMkQf7Ulp5jXyKd2t0SaZz7fPSgql5aGYb6XU7HsL42lRC+fClxEWWX3WnG55KH iOUQGiuTB/1Q6BiXTYbUyE48iZwgd9OIzyGBU= Received: by 10.220.121.229 with SMTP id i37mr2202146vcr.257.1274560421699; Sat, 22 May 2010 13:33:41 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id z13sm10750659vco.18.2010.05.22.13.33.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 13:33:40 -0700 (PDT) Date: Sat, 22 May 2010 22:33:11 +0200 From: Dan Carpenter To: "Luis R. Rodriguez" Cc: Jouni Malinen , Sujith Manoharan , Vasanthakumar Thiagarajan , Senthil Balasubramanian , "John W. Linville" , Ming Lei , linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net, kernel-janitors@vger.kernel.org Subject: [patch] ath9k: cleanup: remove unneeded null check Message-ID: <20100522203311.GR22515@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]); Sat, 22 May 2010 20:33:46 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index e23172c..6260faa 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c @@ -279,9 +279,6 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, if (wmi->drv_priv->op_flags & OP_UNPLUGGED) return 0; - if (!wmi) - return -EINVAL; - skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); if (!skb) return -ENOMEM;