Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755709Ab1CMFal (ORCPT ); Sun, 13 Mar 2011 00:30:41 -0500 Received: from mail-qw0-f46.google.com ([209.85.216.46]:33402 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241Ab1CMF3w (ORCPT ); Sun, 13 Mar 2011 00:29:52 -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=f4JPreKB2JhaKGGOlYOfcAF/MrmnonVwxmZGPIInowA2nl9aWX6TmAcrYKwrD8AKgS 8OLFVCBWqs+45K3w682lYHRPoFCLqpnXcpg3CiTwwPcqFZTvFBLjpl/1xyh7LEuwCDVA p0DaH5SdB7BSEph2vy67FaJ8QIqlmXZTk2dNA= From: Ilia Mirkin To: Greg Kroah-Hartman Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/24] staging: tidspbridge: Remove NULL check before kfree Date: Sun, 13 Mar 2011 00:29:11 -0500 Message-Id: <1299994157-11191-19-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1299994157-11191-18-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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1579 Lines: 54 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/tidspbridge/core/chnl_sm.c | 3 +-- drivers/staging/tidspbridge/pmgr/dbll.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c index 3c05d7c..8381130 100644 --- a/drivers/staging/tidspbridge/core/chnl_sm.c +++ b/drivers/staging/tidspbridge/core/chnl_sm.c @@ -828,8 +828,7 @@ out_err: free_chirp_list(&pchnl->io_requests); free_chirp_list(&pchnl->free_packets_list); - if (sync_event) - kfree(sync_event); + kfree(sync_event); if (pchnl->ntfy_obj) { ntfy_delete(pchnl->ntfy_obj); diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c index 2e20f78e..31da62b 100644 --- a/drivers/staging/tidspbridge/pmgr/dbll.c +++ b/drivers/staging/tidspbridge/pmgr/dbll.c @@ -272,8 +272,7 @@ void dbll_delete(struct dbll_tar_obj *target) DBC_REQUIRE(refs > 0); DBC_REQUIRE(zl_target); - if (zl_target != NULL) - kfree(zl_target); + kfree(zl_target); } -- 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/