From patchwork Thu Mar 11 15:45:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 84937 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 o2BFjXhd006891 for ; Thu, 11 Mar 2010 15:45:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933120Ab0CKPpc (ORCPT ); Thu, 11 Mar 2010 10:45:32 -0500 Received: from mail-bw0-f209.google.com ([209.85.218.209]:45081 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933109Ab0CKPpb (ORCPT ); Thu, 11 Mar 2010 10:45:31 -0500 Received: by mail-bw0-f209.google.com with SMTP id 1so156999bwz.21 for ; Thu, 11 Mar 2010 07:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=T2QVXhGsHyD724r6CxEj+RkZbKeXYF/a7RgAAazKJvg=; b=V3DuvcIoi8lcH9bxZfid5lxQCHNM0Z87lfN4QlYN9LBU11Tu7C85wR6i8IqK6Tp2Xc 1GygIWJ5lElNPVQDkBAu2uZKetkbT2DqwzzpheQFq3kEmk8kha8AF+U2qpAP/1YZDuAG 8vFOyATvNXg6y/ILH8aWMAoGjTGS5+IWRbx10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=RsKvXe91KzWj7LikMA3ylRBNZh9IUxVeA/2+3o7z4uLOJRMvqIX+mfMjf2TIIKDF5I xbbzqOssZcC1U0pKUPIfH4wbUPfFoFqtbw7IFjfUtQJK75WzSjiZM4bKGtHsGMDoPJRS eD6fNXAbzOjPb/d1LpYuf1529A1ISP8k9zrL4= Received: by 10.204.49.68 with SMTP id u4mr119519bkf.57.1268322330577; Thu, 11 Mar 2010 07:45:30 -0800 (PST) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id 13sm66375bwz.7.2010.03.11.07.45.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 07:45:30 -0800 (PST) From: Grazvydas Ignotas To: linux-wireless@vger.kernel.org Cc: Kalle Valo , Grazvydas Ignotas Subject: [PATCH 4/4] wl1251: fix potential crash Date: Thu, 11 Mar 2010 17:45:26 +0200 Message-Id: <1268322326-16721-1-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 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]); Thu, 11 Mar 2010 15:45:33 +0000 (UTC) diff --git a/drivers/net/wireless/wl12xx/wl1251_debugfs.c b/drivers/net/wireless/wl12xx/wl1251_debugfs.c index 0ccba57..05e4d68 100644 --- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c +++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c @@ -466,7 +466,8 @@ out: void wl1251_debugfs_reset(struct wl1251 *wl) { - memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); + if (wl->stats.fw_stats != NULL) + memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats)); wl->stats.retry_count = 0; wl->stats.excessive_retries = 0; }