From patchwork Tue Nov 20 10:53:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12981 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 7308123E01 for ; Tue, 20 Nov 2012 11:00:10 +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 F12C1A18AA8 for ; Tue, 20 Nov 2012 11:00:09 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7948827iej.11 for ; Tue, 20 Nov 2012 03:00:09 -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:x-gm-message-state; bh=zIQ5lhVCbwLPQ3mNejN/2dko/TEc+0S2oq8//sdF0jc=; b=F5yD3gXoD77X63l1mPhgMK/Yrwvi02cysbJI5xN892SDn3aJyA9PrxYqB28kpTfr+I 1Bk42Yo1ZWKlyu8cjtUyl0Fes/xku5G1Ym/9TLiDL4sbEWtxcxuaAEFapc1u1PTLYkaH yKzAKCBkaUQ2+HXUigeOIBbhL/JRJIOWuUDYp5qYP5CDBoCVKT8D87w0c/td/XSEuib+ fYCzn9Ivsdn8lc5cLe9X+Gm/el0ahg+bWsArPk/YVnhtNLgPN5Uk2XDp1ATOyucw0cD+ cf6GGGBVYszRJMYIfjB7iZGY1vsz7i0z5fKTAQOeovRvxiuScmbDVROkob063DhPtEtk vJVA== Received: by 10.50.187.197 with SMTP id fu5mr9434930igc.70.1353409208853; Tue, 20 Nov 2012 03:00:08 -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 n20csp300233igt; Tue, 20 Nov 2012 03:00:08 -0800 (PST) Received: by 10.66.90.73 with SMTP id bu9mr6906135pab.71.1353409208184; Tue, 20 Nov 2012 03:00:08 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id iw4si17844649pbc.171.2012.11.20.03.00.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:00:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.48 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-f48.google.com with SMTP id kp12so3589592pab.7 for ; Tue, 20 Nov 2012 03:00:07 -0800 (PST) Received: by 10.68.115.75 with SMTP id jm11mr41676171pbb.28.1353409207759; Tue, 20 Nov 2012 03:00:07 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id gu5sm7908855pbc.10.2012.11.20.03.00.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 03:00:07 -0800 (PST) From: Sachin Kamat To: netdev@vger.kernel.org Cc: davem@davemloft.net, sjur.brandeland@stericsson.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] caif: Remove redundant null check before kfree in cfctrl.c Date: Tue, 20 Nov 2012 16:23:58 +0530 Message-Id: <1353408838-28678-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlsMAA88uA5+J1jGJ5qdVOJuQQjzorDRr/wUDVGzaZrOR1yjV6KX1Rw0PeMMdCjIPsnnduU kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat Acked-by: Sjur Brændeland --- net/caif/cfctrl.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index 44f270f..a376ec1 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -515,8 +515,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt) client_layer : NULL); } - if (req != NULL) - kfree(req); + kfree(req); spin_unlock_bh(&cfctrl->info_list_lock); }