From patchwork Tue Nov 20 11:40:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12987 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 785A623FC0 for ; Tue, 20 Nov 2012 11:46:30 +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 2B7EFA182AD for ; Tue, 20 Nov 2012 11:46:30 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7998728iej.11 for ; Tue, 20 Nov 2012 03:46:30 -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=gSbkmJ6+AxgK/dIY8wKkeIYLgJApn08FFJ5I60lCyk4=; b=pzV2gVGwB6zDRlKs89YyH1FQjz5m/7DSIVL2t+5hPsJ3M8kvWhUm6ddLpyub7Is+Sj fYodUSMD24pCVusGYt+97Sby+8G2k9yqdy5k3uEvVBFtvya0wYBGsGlIp2DBgHHGD7kT JRb4b0zdkEACWia6zjlxSsdAEo2SwfaAXLV2kZPyfa3YqBx8l1pNanAiNlFoXIycEjAC Jis8kUDKeHthB4Yh3PjNoBlkeOmyheHkEBuSdzaJFpMTTsXKkfszODw8Vla9BplTFrSz 0B/Nx46HujRUiD7m7h+/LixZZDv5oy+dl6c92hmnxyZPP4XKVOYUdELSf157S1CiNRnN 2IQA== Received: by 10.50.152.137 with SMTP id uy9mr9515152igb.62.1353411989956; Tue, 20 Nov 2012 03:46:29 -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 n20csp304891igt; Tue, 20 Nov 2012 03:46:29 -0800 (PST) Received: by 10.68.138.137 with SMTP id qq9mr48786213pbb.74.1353411989131; Tue, 20 Nov 2012 03:46:29 -0800 (PST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id m5si17604115paw.339.2012.11.20.03.46.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:46:29 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.53 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-pa0-f53.google.com with SMTP id hz1so665434pad.40 for ; Tue, 20 Nov 2012 03:46:28 -0800 (PST) Received: by 10.66.79.167 with SMTP id k7mr7261631pax.24.1353411988910; Tue, 20 Nov 2012 03:46:28 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id bc8sm7968823pab.5.2012.11.20.03.46.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:46:28 -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 3/3] staging: ozwpan: Remove redundant null check before kfree in ozhcd.c Date: Tue, 20 Nov 2012 17:10:10 +0530 Message-Id: <1353411610-3401-3-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: ALoCoQkfhUSGc4vvbiYaCqmHSNSbeW9Xfy85NXJ0Ddry8Rcod4ajRKx1QL2olrW7j9DXxsNUm9aS kfree on NULL pointer is a no-op. Signed-off-by: Sachin Kamat --- drivers/staging/ozwpan/ozhcd.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c index 33c0009..b2d77df 100644 --- a/drivers/staging/ozwpan/ozhcd.c +++ b/drivers/staging/ozwpan/ozhcd.c @@ -278,8 +278,7 @@ static void oz_free_urb_link(struct oz_urb_link *urbl) g_link_pool_size++; } spin_unlock_irqrestore(&g_link_lock, irq_state); - if (urbl) - kfree(urbl); + kfree(urbl); } } /*------------------------------------------------------------------------------