Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1353575rwb; Fri, 13 Jan 2023 11:03:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXusHE49VbaU7l7bU02Z1Z1sl60VKctFuP3g7MoHFarTWxA0f0QTFuDXnkfS7oJkYpbm3uHm X-Received: by 2002:a17:906:284a:b0:7c1:e78:1e2 with SMTP id s10-20020a170906284a00b007c10e7801e2mr87434619ejc.11.1673636586671; Fri, 13 Jan 2023 11:03:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673636586; cv=none; d=google.com; s=arc-20160816; b=sY/TFBFFVpEGVmIXMUMfFluT3VsWDB5iIExPfmyosYYcQcaFFopRe/xNocVDBOcDzR 2ALPglZuYPTNf7O6gAl9ta7vrIze+eooehq3Ts4D9LlhEtlI9CXVUbAz4yS7dXnfXyS3 D6NaRsyQzMuVJpe81fsj0X0wd3PG+/LwjrLGvMieXNk3Dcv/rEstZj2o5wKI/X0JuGwh Dl0JEBmQ4Ph4Ot7r2+4lcjsIhkM7AyD4+H6m48Ejloyz/AiHhHaHaLhB+0xx5bau0yew dGXuCWPZkYvpnnt8Fmv56d1wZBY942Hi/EtLA8XMtYr2D94d5BfjdXtra6GsdZk1zkjS f2hQ== 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=km2chU6Uz/sy/0UFbCpxcWmUeBDD1WA+yAZkjGgI1Lo=; b=shNMM3MIYU1qy0eWqhOFAy5AV5WMZ+0wk6QzsPxc/65d+c7gz7SZG9tugP7Lah7PgY B2Or2m3Td6hH3AEJ1HVzSY2UNJ/YEN7RkK5k3cem2mR95bBIV18bhrXhR5DSTV84cghq wzuAfIUudH2VOsoAMJxrufjbApp2gWnmzjPb30WnL5AjGkbFoG/rvIxWT5ETIcZizpYS Ci6fvwal9bLY7+LMsr7ahgs7lTPoLL5YLq6S3eh5BEEawvrUVurPMV4vTe5bf7ZGobSq b4ObWyiBGCl5NmnYVUWvyabMv+SEqhm0aVvgx5Z7+/fexV93JeTTNc3FX+X1sMClgeIc 9muA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="SwXdZ/Oc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc37-20020a17090716a500b007808f3f4cbcsi25097324ejc.239.2023.01.13.11.02.53; Fri, 13 Jan 2023 11:03:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="SwXdZ/Oc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230186AbjAMSs3 (ORCPT + 52 others); Fri, 13 Jan 2023 13:48:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbjAMSsZ (ORCPT ); Fri, 13 Jan 2023 13:48:25 -0500 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B20327183; Fri, 13 Jan 2023 10:48:24 -0800 (PST) Received: by mail-qt1-x834.google.com with SMTP id d16so6831781qtw.8; Fri, 13 Jan 2023 10:48:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=km2chU6Uz/sy/0UFbCpxcWmUeBDD1WA+yAZkjGgI1Lo=; b=SwXdZ/OcjODyj0kahdbYvA6ok6v2hzrOhYo/1Lsijf5KrYh9vH3rGCurdP0CIJTz+E fTGvnMACw6sr9xJ1dxnsXkdLyHFXPQJcl54JzKYnpWDq4hKTRlVYFEMwQtSG3+lIAmYW 038kDrDiDIfNQnN7nzOuvpihuFIA2rFm9JOVY77eypYMJYvBBB8ygoANg/3fTsAq/VIN dN90mIJ2PMTnr+0NF6XuxzGeJd23v+vJ1oUn3L6FtGleeQ5xGG4t0LsNcVg5VOpD7wbE mPmVaHW3kycRSkYaHQzw3CM9oT2Tdln/gb3NPcGCbZjuI+eduDB2vpFfmtVvTxvqkYsE 4SQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=km2chU6Uz/sy/0UFbCpxcWmUeBDD1WA+yAZkjGgI1Lo=; b=50l9eOPXf81Lqm/864rq+O7edgQEt3qYET5iCK0mEMQWCeGMvp1QpOstRW3rVf4S44 WKAGsxFSYKQtUOxaCP+GfjESkBVzWHPD//7py7ysKKWTO6fNwzdjWkO4aV+cE3qZZOKG 1Azz8tFh4CoFUsHv1XxVnjCF5hFjT5hQRB06E6ZJCQ00uAq6Ch/bShNQY6uMTa9soQ7R Rw/R3s0GcZVRJ06fXxiF/tQuG0uhPl1S/rWa1T0TZ4zS8FVTV6xRlkOTtrPsFGpmIkCB FPT22JDlB0cJw1znL0se7x96HcV+/NGK0XULqCO7lik8KohIdv8q1Bu6YiW6qzsEOWkD p3VQ== X-Gm-Message-State: AFqh2kpFI2AN2SJfnj3Bdwns7YKmKzU74yfl3NJfARqWsat67F2c7ic/ MDJwLjgMDR2UWr79mYrjTz83IiRqkhGn6ue5OG0= X-Received: by 2002:ac8:1247:0:b0:3b1:328c:ff11 with SMTP id g7-20020ac81247000000b003b1328cff11mr283404qtj.195.1673635703313; Fri, 13 Jan 2023 10:48:23 -0800 (PST) MIME-Version: 1.0 References: <20230113133320.7531-1-abelova@astralinux.ru> In-Reply-To: From: Andy Shevchenko Date: Fri, 13 Jan 2023 20:47:47 +0200 Message-ID: Subject: Re: [lvc-project] [PATCH] iio: chemical: scd30: Add check for NULL in scd30_i2c_command To: Alexey Khoroshilov Cc: Anastasia Belova , Tomasz Duszynski , Lars-Peter Clausen , lvc-project@linuxtesting.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Cameron Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2023 at 8:41 PM Alexey Khoroshilov wrote: > On 13.01.2023 16:33, Anastasia Belova wrote: > It seems it is better to put the whole validation loop under if (rsp) > check. No. The entire patch is redundant. The code that calls this function is under the control of the same driver, so we know how to avoid shooting in our foot. -- With Best Regards, Andy Shevchenko