From patchwork Tue Nov 20 11:40:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12986 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 850E023FC0 for ; Tue, 20 Nov 2012 11:46:27 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1A3B7A18FC5 for ; Tue, 20 Nov 2012 11:46:27 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7998728iej.11 for ; Tue, 20 Nov 2012 03:46:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=DM6tBUjEBRRNjKXZlTkITmBHzGbk2wOopQqtphQwP04=; b=Ho1LUhHPM3LFkzYXvvRMtDQoCfZBoQIFQaN6Wo3i9yOEi+uYt3t+E+GYTQW9HOb2lB kNfquznWgUm3qmXKz58+P7b95BL6aTUwzzmbG+wA+cgS+n0+91LG2n5j34Boj9usYHdL b7GlW5E1lVNeKJMqcQptrw3T0q4qy70LfeHEwltNkRpMr7TIH1VFN4HPXRoAlmCSrlmA TPadQnWz+A0CG3ehLphPm5GRY0pKyWLAJBLbRcl/g8EmLNsWgbLhXgaKfwDO5cuMs9to 5vFCF5kBExc//n45C3FVxnhT4TDN3C/04lPtn9vu9TIeRhVMDKzvBF6qfxVBRxPRXHqN M5/g== Received: by 10.50.213.69 with SMTP id nq5mr9576856igc.70.1353411986562; Tue, 20 Nov 2012 03:46:26 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp304889igt; Tue, 20 Nov 2012 03:46:25 -0800 (PST) Received: by 10.66.85.69 with SMTP id f5mr7210630paz.50.1353411985741; Tue, 20 Nov 2012 03:46:25 -0800 (PST) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id bt8si17632485pab.216.2012.11.20.03.46.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:46:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f46.google.com with SMTP id wy7so4223713pbc.19 for ; Tue, 20 Nov 2012 03:46:25 -0800 (PST) Received: by 10.68.234.36 with SMTP id ub4mr48327700pbc.68.1353411985501; Tue, 20 Nov 2012 03:46:25 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id bc8sm7968823pab.5.2012.11.20.03.46.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:46:24 -0800 (PST) From: Sachin Kamat To: devel@driverdev.osuosl.org Cc: rgujare@ozmodevices.com, ckelly@ozmodevices.com, gregkh@linuxfoundation.org, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/3] staging: ozwpan: Remove redundant null check before kfree in ozproto.c Date: Tue, 20 Nov 2012 17:10:09 +0530 Message-Id: <1353411610-3401-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353411610-3401-1-git-send-email-sachin.kamat@linaro.org> References: <1353411610-3401-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkUf7FCVbCuDl6vuzTtvelHqAiV34EIj3ZhV/qKZIX06H3c1yH6KjkRePt9vPuXwVQBlCVP kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat --- drivers/staging/ozwpan/ozproto.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ozwpan/ozproto.c b/drivers/staging/ozwpan/ozproto.c index cfb5160..e00a539 100644 --- a/drivers/staging/ozwpan/ozproto.c +++ b/drivers/staging/ozwpan/ozproto.c @@ -566,8 +566,7 @@ static void oz_protocol_timer(unsigned long arg) } spin_unlock_bh(&g_polling_lock); oz_pd_put(pd); - if (t) - kfree(t); + kfree(t); t = t2; } while (t); g_timer_state = OZ_TIMER_IDLE;