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 27990C5479D for ; Mon, 9 Jan 2023 11:30:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231219AbjAIL35 (ORCPT ); Mon, 9 Jan 2023 06:29:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236930AbjAIL3n (ORCPT ); Mon, 9 Jan 2023 06:29:43 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 722AC186D5 for ; Mon, 9 Jan 2023 03:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673263782; x=1704799782; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=IUou9iqdGkDAvCn8J53voHvEjPtlDmE0Tm1FltzLgjE=; b=mOEUGn8kKpZHyQbuPQJw9V/oCZKkedtRbVKvP2L40CaxAvFL6UBpO7au 3OPk4StHo/NHfSwa15yA3buncVbrSa58Hz6oC0b42mgnEMMUow2QpLx0S KjDNx8+Rx6Y3IezrvJrmfxidJ+GflmPgUQLjYnY9FAiZrXKBt9RXAp+jL QWT4+qWp80B1RoIjwjeOIb3Y1VaFmqLGGU3PYj9yN3eWjfq4rVxDQGuOY eNzGQbG1zvadiUP4zTvktFsWs+iYyhfbX7hGLq0Y8UQ4YYvRXOE603Tst 21PwCwUlx3a54Ue5IeU4UQ82I+j3KV6IqYEW7LAVAwcmIf0raTEkzYXWy A==; X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="324098290" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="324098290" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 03:29:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10584"; a="634179112" X-IronPort-AV: E=Sophos;i="5.96,311,1665471600"; d="scan'208";a="634179112" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP; 09 Jan 2023 03:29:39 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pEqLR-006MhT-2j; Mon, 09 Jan 2023 13:29:37 +0200 Date: Mon, 9 Jan 2023 13:29:37 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Kent Gibson , Linus Walleij , Viresh Kumar , linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: Re: [libgpiod][PATCH] core: make the library NULL-aware Message-ID: References: <20230106115129.393007-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230106115129.393007-1-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Jan 06, 2023 at 12:51:29PM +0100, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski ... > GPIOD_API void gpiod_line_config_free(struct gpiod_line_config *config) > { > + if (!config) > + return; > + > free_refs(config); > free(config); > } At least this is redundant. free() is NULL-aware itself. -- With Best Regards, Andy Shevchenko