Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756005Ab1CMFao (ORCPT ); Sun, 13 Mar 2011 00:30:44 -0500 Received: from mail-qy0-f174.google.com ([209.85.216.174]:38402 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399Ab1CMF36 (ORCPT ); Sun, 13 Mar 2011 00:29:58 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=KrJEnvBr9qzh7EDTebLmNctJENgHKvpVdBTuBk/Rko2WN1oL4YQ5qD5Q4YDgNJaSAN roy3GA3bxP0Dk0S9s0istwPLkUkcJce9e3JyJakz2Xm9jUy4GNe2GtVGFczXhgRPQ9VU X6XTdF2+PZB2FsU+s/hDsN5HQ4GQ6pkoK3x3Q= From: Ilia Mirkin To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 21/24] staging: vt6655: Remove NULL check before kfree Date: Sun, 13 Mar 2011 00:29:14 -0500 Message-Id: <1299994157-11191-22-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1299994157-11191-21-git-send-email-imirkin@alum.mit.edu> References: <20110222145452.GD1331@suse.de> <1299994157-11191-1-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-2-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-3-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-4-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-5-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-6-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-7-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-8-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-9-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-10-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-11-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-12-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-13-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-14-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-15-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-16-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-17-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-18-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-19-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-20-git-send-email-imirkin@alum.mit.edu> <1299994157-11191-21-git-send-email-imirkin@alum.mit.edu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1823 Lines: 69 This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Ilia Mirkin --- drivers/staging/vt6655/device_main.c | 3 +-- drivers/staging/vt6655/hostap.c | 3 +-- drivers/staging/vt6655/wpactl.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 638e391..efaf19b 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -3064,8 +3064,7 @@ else { } error1: - if(buffer) - kfree(buffer); + kfree(buffer); if(filp_close(filp,NULL)) printk("Config_FileOperation:close file fail\n"); diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index 5b83f94..7735027 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c @@ -860,8 +860,7 @@ int vt6655_hostap_ioctl(PSDevice pDevice, struct iw_point *p) } out: - if (param != NULL) - kfree(param); + kfree(param); return ret; } diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 4bdb836..fbae16d 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -987,8 +987,7 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p) } out: - if (param != NULL) - kfree(param); + kfree(param); return ret; } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/