Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2871051pxk; Mon, 28 Sep 2020 02:13:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDu2gD4BU2jmWumDbuR+1dGOtFWqxPnvAahUdeeW85EkWTCyi9l916ispAfIAkkGPuR4QC X-Received: by 2002:a17:906:e103:: with SMTP id gj3mr678909ejb.153.1601284425866; Mon, 28 Sep 2020 02:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601284425; cv=none; d=google.com; s=arc-20160816; b=GoNPXMzyvLPkbkxrHoKPdwaMTi4mJaZPliav/yeQThRm1yOTAFiBOSeREsYgUOQdu/ kWP0EdK27X60/tN/qrEHiMWm85BWErl3lVdwmCzsSxkKEQKYkVbdncL0tnKC+dOjfGnL +OUDghUXTmzQVjMgP8b3VQb6QQxwwQpw/F5bWXpWH3tJQPRoE1RL0EWasrOit8flGFsx iud3n3c+dNx+HxgSQO339b+9FVAtha4UFvWlF8EkPmnQ8GINtLaemji9/1Gk0yGXMMzH W9Hjws8IKknvbrvFUgaNSHi8RILotFf7HLoO/wB+r0tzMRpu5Va9xqpS2bDHWdHwUrYp +Urg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZiEI44lVQql3CV00anMbhOQHPESlcWHyF66pXqicaoQ=; b=cNTwg1Ae4w8w+BZSzES7Pwi3q1ZyLkYWAG31yGOCVsTtrgca0OYt7czBqDI4Q1i9z6 9c+TNUtFRiRiS7g30DHFEoLRcCsJQNPz0IZ10wpp2sOCAwgTLOcPZcpnxhVo7W+syN5Z jT6EF3Cf1bJU1f4mcOSEJcWB6VuUEUS+ImGsgGJ5Kfx/yFb58+EZPBPqvYbdGiOvD5IL /VL6mN5wLDf32cuZKjINswFF1Mbe0VExiVP2jCCE3XGOBw3n8ohZm5fz5vP9mo8z3Zls eq/ahGCHyRB13hXNF2uB7EkUir8+mBxhYN45nSLDbFKdc57ly2DRwtiCfeMF8chpdgoi kq1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aasVp887; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q16si248576ejt.139.2020.09.28.02.13.23; Mon, 28 Sep 2020 02:13:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aasVp887; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726638AbgI1JLW (ORCPT + 99 others); Mon, 28 Sep 2020 05:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbgI1JLW (ORCPT ); Mon, 28 Sep 2020 05:11:22 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BA33C061755; Mon, 28 Sep 2020 02:11:22 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id mm21so275072pjb.4; Mon, 28 Sep 2020 02:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZiEI44lVQql3CV00anMbhOQHPESlcWHyF66pXqicaoQ=; b=aasVp887UK0+pu3XY9sdoB11qRDafaGklbzs0JAIQ+p5WCp2TNLpvyyZhgBjSM27Eq fI1Dzl3XlyIlZsWMoNivjoWW1a1M67/+iycWqLTR2/+V1rM9GDKEhnN7tDL9+s2wB3bi eDdkEiQu0qalqs7JLDDA9LpqfIDQ8ePI5rfc/tfVlVY9aozHsESsGWHuq4/IHV6tg4DX qN9qIwu4zirlwrmNnXwHU3t+aeiVcqsNF8DMCKx8rrvaGWNo+PV7GmrYkTiTfbEUWsOc +qQrk/4mNCO/Dk/B12yMe1w0GvErIjEkR02Laj5d5XqVqKwKScj1dErHCef42thnYHju DhuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZiEI44lVQql3CV00anMbhOQHPESlcWHyF66pXqicaoQ=; b=exaCOXEU6Hu5O5GoYYzBxiNSqX9aHgsKjOhl18xwF29Q9dnWlld2dLs1TxjWuTFJX8 YzOC7qQvsed9OYMFrqD4C6fM5wt+7S+rweJJXh9j5UNb27fuVXibCrvoHLVP+IHwefrI Y1jD4YdMKEGc1TqwCAhOMQA1Lj782gFQ6L5LLYpqUP7A5PXQFkRwhExUv5GVuPgC48hT MSLcWS2XTsPqn76K7i9cqEVWB8LdVRiMSCuLw9XSqkGS2/hC9tA8yTR/9Jm4ANsmzDfU iUkC+43FTeQ06MNiSqIQR/Ij0kMKcJXbRBlA1V2oLvN4LE+JZYYFWn61VIcIS0sV5q2+ 7eAQ== X-Gm-Message-State: AOAM531sy7lZJRRQv78QyIxuLQ9b3JjugedfZHmwvs+l9BAmC7S9AFtz R76qx8TodNA4o27bIWxVWPPuLZJ/uNbnIvzGgdc= X-Received: by 2002:a17:90a:fd98:: with SMTP id cx24mr431011pjb.181.1601284282032; Mon, 28 Sep 2020 02:11:22 -0700 (PDT) MIME-Version: 1.0 References: <20200924113842.11670-1-brgl@bgdev.pl> <20200924113842.11670-9-brgl@bgdev.pl> <20200925090329.GZ3956970@smile.fi.intel.com> <20200925123000.GD3956970@smile.fi.intel.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 28 Sep 2020 12:11:03 +0300 Message-ID: Subject: Re: [PATCH 8/9] gpio: mockup: use the generic 'gpio-line-names' property To: Bartosz Golaszewski Cc: Andy Shevchenko , Bartosz Golaszewski , Linus Walleij , Jonathan Corbet , Kent Gibson , linux-gpio , linux-doc , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 11:45 AM Bartosz Golaszewski wrote: > On Fri, Sep 25, 2020 at 6:41 PM Andy Shevchenko > wrote: > > On Fri, Sep 25, 2020 at 01:40:10PM +0200, Bartosz Golaszewski wrote: > > > On Fri, Sep 25, 2020 at 11:03 AM Andy Shevchenko > > > wrote: > > > > On Thu, Sep 24, 2020 at 01:38:41PM +0200, Bartosz Golaszewski wrote: ... > > > > > + kfree_strarray(line_names, line_names ? ngpio : 0); > > > > > > > > Perhaps you may check for NULL pointer in the kfree_strarray() and drop ternary > > > > here? > > > > > > > > > > I did in the previous series and you told me to not to. :) > > > > Hmm... What was my argument? What was wrong with me? free() should be NULL-aware. > > Well, it is - your just need to make sure ngpio is 0 too. :) Do you really need that? If you have NULL as a first parameter, the second one can be anything. > I'll revert back to having the NULL check. -- With Best Regards, Andy Shevchenko