Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp247909pxb; Wed, 22 Sep 2021 21:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOziY+EKdtkkkgVkkG3ZqdqeNqp3M7lBG7QuRAYsKmYjcQuJ3GNkAR6Z6J0boAMykEsPWu X-Received: by 2002:a5d:8d06:: with SMTP id p6mr2173271ioj.7.1632372651254; Wed, 22 Sep 2021 21:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632372651; cv=none; d=google.com; s=arc-20160816; b=mW8J0RhqRXejoki6MdntwIWaUnIhSXYBF/lsZqUYAqDSUHoem0qqwhxyDqFohmpouy t6Hyjz47tQ9/WNRUlK8J0tw6YG2fxc4XSlLK3siTeERlCDd7J1/aeWG6GqLpJkMMtusV Bx+t7iyktD11R8tjVxmCEqOEv+Q/EyjxiXjf2KowdMgzOcT0mErKZxZdizhlUMhTO11I JT1rxkepmZyGVAChLoWpyZDMr9WIkd95xj74H2kaupAMeG9EX9AMs++E4ziVbrlsN0ln MxQNSZe/T+Vnvh1ng/iYjq3uVfP/Fqp3S1HaeIAH9AlEpC8i8F0Aoc+l34txFSHGY86h dLHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l0dcEUqzxfeuXFOlnlja26gpPaTP07EM1c8BAWlCuWk=; b=SEQ8H0C2UxoQ0KeiJSP0AHVew1+EbhOplFhJ60FDL8tFLi+XxF6+HWCiz1N6r01Yyp rTjfd1OFn8YKOCBNIGPcUXCNl18VEvXfA/vkh0KjKMSgXZKNjcsUG9XeYKmfQUVp7pPu jq2hX1DjpJPxSddqcmNldZhekUi4lDUNYt21IU1uOrz/S3FXtR5QSicP2LGXsRnR0uQD 9ARrqn0wiRW6RkP+whjvDkmp/HLCNTck/rMdkMgdkiinSAiOjDn8iiwZrezycdWqGEZk CpSKNpV8l8prMDNqrjINM+smV5d2BKRLFg5s/MGm3z/Z45/4Gcqrhv9XTZx/H4c/5JBJ Dx1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eBJQktB5; 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 d188si5423442iog.62.2021.09.22.21.50.38; Wed, 22 Sep 2021 21:50:51 -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=20210112 header.b=eBJQktB5; 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 S238878AbhIWEug (ORCPT + 99 others); Thu, 23 Sep 2021 00:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbhIWEuf (ORCPT ); Thu, 23 Sep 2021 00:50:35 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41388C061574; Wed, 22 Sep 2021 21:49:04 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id c4so3214082pls.6; Wed, 22 Sep 2021 21:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=l0dcEUqzxfeuXFOlnlja26gpPaTP07EM1c8BAWlCuWk=; b=eBJQktB5z8hH8DsbSQNmoGarfDOGkvj2NVgiTjT5zxAg/cfUg7/xH+5g+WaaptFcvb 2y02841NeapSRqaHqn7qUpdj9Pkj1GxBbUyagQUww8wFe7Byw9snXWV19/IzPRT3HvVM a5Gvn/nCPoxZ3BfMgJe1wQPLKHfXiyOALwpvgmy1kEQc1tdkPeu65wgQ8FLYWcvfBeq+ PO3O0xDfCz2TBBnlouC1awNnC5G6WPoib9sDbfJ+PHBR9eE9G+BRqrCECJ2/O6DCKEQU NeZvneRifgTE3kWB7ud7Uzldd1+yFgNf0E9qRonBaJcUGGCmRCDcUQaoHwNHK+1Os8Jq LzSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l0dcEUqzxfeuXFOlnlja26gpPaTP07EM1c8BAWlCuWk=; b=yhjypL5kb1PbI4hElz9p5aV/wDcBCs/d8mW5Vqd9PDgzTna9px5Yf/ZpagA/SxvrCB kry79xv1tTEzClU2j35Rw1QwX9JiH670DTeujpZrVPiT3WOQFhlIrkinzC2dc0OdJjOe xqinDU9zxhjXvjfBdzdUl3vky/2RkKgMHJ7fZTwrwzSmbxdNR2my/dgXbTleJLMwn9mF 7bXw8gCjLcakeifTUUZgQS/PTaKVoNwDnaflTekPEDDUNfZexT+4iaMaXDe1iyuy2yFQ Fqlj/eEku/+vXqLWC5XDh/CXlbVeVDGanbFSgyn/SwLyQDYVwLZONdkcrwfn3XpAgXSp yUYA== X-Gm-Message-State: AOAM533RklB7rthwBmvGJH0V76JQMPIRq6foMst4zxxm74vFvedHQ6z1 wG0nysGPd+IoJiE/rhgz++s= X-Received: by 2002:a17:90a:29a4:: with SMTP id h33mr3146490pjd.88.1632372543538; Wed, 22 Sep 2021 21:49:03 -0700 (PDT) Received: from google.com ([2620:15c:202:201:f198:36ef:2b9e:5c76]) by smtp.gmail.com with ESMTPSA id i8sm3876684pfo.117.2021.09.22.21.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 21:49:02 -0700 (PDT) Date: Wed, 22 Sep 2021 21:49:00 -0700 From: Dmitry Torokhov To: Cai Huoqing Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] Input: elants_i2c - Make use of the helper function devm_add_action_or_reset() Message-ID: References: <20210922125212.95-1-caihuoqing@baidu.com> <20210922125212.95-2-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210922125212.95-2-caihuoqing@baidu.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021 at 08:52:10PM +0800, Cai Huoqing wrote: > The helper function devm_add_action_or_reset() will internally > call devm_add_action(), and if devm_add_action() fails then it will > execute the action mentioned and return the error code. So > use devm_add_action_or_reset() instead of devm_add_action() > to simplify the error handling, reduce the code. > > Signed-off-by: Cai Huoqing Applied, thank you. -- Dmitry