From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD2DFC54EBC for ; Sat, 7 Jan 2023 20:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbjAGU3u (ORCPT ); Sat, 7 Jan 2023 15:29:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbjAGU3q (ORCPT ); Sat, 7 Jan 2023 15:29:46 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A7E34D62 for ; Sat, 7 Jan 2023 12:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673123377; bh=Vg0zzi0E4maI0sKskX31d41VWY8Rj+KdJklhQyGkCH8=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=T2u91W+pNODLeh5YPl5ZS4JT+J7wGG9uDsaMu6/A6WU1SuHlOz6e9XkRUvL+C+8Wf FkJv42HLUJfAVtNIg8Sr1fIK8QV8gJyoMeiKNk+2IuQ1s2THyGGhbvj+222srLzIKd ir1nZlVXP1cnHlcYUhw1lnhR4l1EYMJb+SwMk22I= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 7 Jan 2023 21:29:37 +0100 (CET) X-EA-Auth: OzqmESPCaOU6ngWC3y6TpSCEfwulT5b4cksaLF7iCWZtq0pZYGLMADrUbXuJKrnxWltvMrYDQAjp4SM7nrIKEOCgddREdgr4 Date: Sun, 8 Jan 2023 01:59:28 +0530 From: Deepak R Varma To: Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar , Deepak R Varma Subject: Re: [PATCH] drm/amd/display: No need for Null pointer check before kfree Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 28, 2022 at 12:09:51AM +0530, Deepak R Varma wrote: > kfree() & vfree() internally performs NULL check on the pointer handed > to it and take no action if it indeed is NULL. Hence there is no need > for a pre-check of the memory pointer before handing it to > kfree()/vfree(). > > Issue reported by ifnullfree.cocci Coccinelle semantic patch script. > > Signed-off-by: Deepak R Varma > --- Hello, Requesting a review and feedback on this patch proposal. Thank you, ./drv