Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1683641ybv; Fri, 21 Feb 2020 01:37:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxlLr75+jQze5NfjYmZ30UE1bC0lrbhHvtBcPu2mEfpyHV+jDBzEBsetMKfF4T+GCm8QeEv X-Received: by 2002:aca:3542:: with SMTP id c63mr1215206oia.135.1582277844269; Fri, 21 Feb 2020 01:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582277844; cv=none; d=google.com; s=arc-20160816; b=G6HsEZ9LMUU2Y0NmKXH/EoGgDK5i30EUDX5XhBgr13tSEHfIJEX7BP3CQHIzdP3Mgh C5IkeTiKgzL2egA8vnb5awALqGdGqSLZ40/Hg+yWJawwDxrGmymAqmxOjYMqNfxfoxCa q9iZDmg4ybipuEaKyEaBhYgyubCUzDhCuaa8YxjlSrKHtFNUl0oKXJsf3yU93xcmEOIy j5botJgLmUW76FRSNyKf2dysSC+zJkCOxvLmlQ+kkfeCfoDiwZgvCtaOurwJQb7QR6ih 3ECwZ68PTKtC3PuEEkGJF2a/xErNQU0xh+awZka4ZqUebo10yB1pzBkpZK6R+TUtBF5n Qv/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=l+VSzBk136F0WnmD8vd1UXyUqbIVYbRCZbVzHfV0nCo=; b=T3YM8x6GPbn6/6JlJ1KvHL1RsCYj0wdZ9TjITA8Ac8QyIt/46Dg7KM7oTDz7npccVo tuf2VssZB4fkec4N07W9tUbog/6Cxpo1Njsi0bmldrH2juhgnQK7wOqbMthU/vQRbEVO EZQ9nKXrs7M8d48E/p9qHQtmlX3ZVz2XKYJc67bPBagNgL8UrLHgvIIjMflZ2Kw5YYvH tcjSlG2n9Im+7Upa1qnoTcRkgTCnvZFiSE0ML1RjEwJggKOpZSkVm76w3XV48ojLqMbv Th4mQ8AZQ3kbn06PNVBpbGluZ2Rf3f3ZGdsHXjkq+xMorKhgZZmblL1nQXRnlTNkO8dW s7MQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si1192857otx.50.2020.02.21.01.37.11; Fri, 21 Feb 2020 01:37:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728172AbgBUJgn (ORCPT + 99 others); Fri, 21 Feb 2020 04:36:43 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:34123 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726984AbgBUJgm (ORCPT ); Fri, 21 Feb 2020 04:36:42 -0500 Received: by mail-oi1-f196.google.com with SMTP id l136so1002702oig.1; Fri, 21 Feb 2020 01:36:42 -0800 (PST) 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=l+VSzBk136F0WnmD8vd1UXyUqbIVYbRCZbVzHfV0nCo=; b=blhMUVEXZ9uOhLwDwQlHuHHxrIj/Y6JHgjtqgKLmiYMQoxo/ERgEa4ExjFqashOCi8 66wqmOcIDdg5WVEzTu9Kh366jcebleI+KNuaV/oC/UnQHhpWOjiCEzn5ttCdwqnWk9oA yLzGOaCf5xnQJ6Y4f42yVVbt2a1tAWkJcucZfl/IguHJuDAFltf4mTdw+ZohluSwVhXE o9Fot4i7Vvpqkv4sepJlBTztU/gz+pM01ND2gwlw/3gELp5RKpv2cR8ls9NVsjIlKuUh +Z5u0VfZn6O51wpSwYzv39TG9qoYxDPp1Ptzw9PIqrC6WhAQVQxGFE/V/7+F7IaiaKVS AJug== X-Gm-Message-State: APjAAAXwu04ovSt1iF4Ysp7dv5B6pLxw123ABQ5ZX4sthaYJL73eD6BE w/b62JcNuNSARRz7jj+sgWjULqagDJxmn9I4Ox0= X-Received: by 2002:aca:48cd:: with SMTP id v196mr1273580oia.102.1582277801696; Fri, 21 Feb 2020 01:36:41 -0800 (PST) MIME-Version: 1.0 References: <20200220172403.26062-1-wsa+renesas@sang-engineering.com> <20200220172403.26062-2-wsa+renesas@sang-engineering.com> In-Reply-To: <20200220172403.26062-2-wsa+renesas@sang-engineering.com> From: Geert Uytterhoeven Date: Fri, 21 Feb 2020 10:36:30 +0100 Message-ID: Subject: Re: [RFC PATCH 1/7] i2c: add sanity check for parameter of i2c_verify_client() To: Wolfram Sang Cc: Linux I2C , Linux-Renesas , linux-i3c@lists.infradead.org, Kieran Bingham , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Luca Ceresoli , Jacopo Mondi , Laurent Pinchart , Vladimir Zapolskiy , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On Thu, Feb 20, 2020 at 6:26 PM Wolfram Sang wrote: > We export this function, so we should check the paramter to make it parameter > NULL-compatible. > > Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven And then the check in i2c_acpi_find_client_by_adev() can be removed. BTW, can the i2c_verify_client() check in that function actually fail? If yes, it should call put_device(dev) on failure, like of_find_i2c_device_by_node() does. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds