Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1337144pxb; Thu, 7 Oct 2021 05:55:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygyhBTQn6qgs1fHkEzGC6VHu6vBXcanlribpmmlc0SMXmrD/baL1MT8QimTjMcnjRIX1U/ X-Received: by 2002:a50:e043:: with SMTP id g3mr6261385edl.196.1633611340717; Thu, 07 Oct 2021 05:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633611340; cv=none; d=google.com; s=arc-20160816; b=JgH4UwUouPEwY/96DP3rjA/LPU6UIde/cPnljTimcQi1jLew1alLAwl+hK5Lzl91ao v4LEFtPsqghyTjGZvjBii7jTxsOhnEIXWlNgy8jjA5URAUT2Cqaivn8fw9ON5uAgOJKs 1ennDULz2Aiyt/zoIS5vhoPN+vqptRu5P/Ec3DTiL146/jEt2JNoxguYZWE1mvpFmwE5 Qn3rZP3FocdJ9FohyD9kYgSvRHIj3yy43W82pvUlIolERoF6uPqo29/V9JVuZv0C+A22 rjpEouq92OBTVvWyEP9Af3TukNfCqUJlUOCGxBPUhSrm02Nm3Z6FKzO4Ca8LbgL6OXF8 Pytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=FzfxW2AP6I6zIK4efmyPBRs0Gd9dNNTQ7EPYE2l7AbU=; b=LUzKHKadb5B3ZXLpOI0kWXCUXXmSH0C0NIQLxfJcQNH3X4Ed4WtIxXvFJBEfXafaYQ BhU/TcLAsIiTE8EedsSWwOnXM2Ma9yFPsftlWMHdlo5A5rIfJOkucanvxjd6P1hVXXPW o9KhKTo6Sjs+CCswDzvLB0dIxieesr5svhba60slZLbbold+1SLWFC/SXwncMzdBW1Ii GY61BSCVoqnsbZ0yOVHAdNh27f80s8GIfa9USNTdrN/01bxZ4HUllvNzlxUA77Cbvdya Xj6ANvH8s32OIhn+howgMhzMcoBzi2Uxbw/DX9ChBaayi9qES3fXG7ukBcNV07UDr15r goUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IMqggbLY; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si35443202eje.454.2021.10.07.05.55.10; Thu, 07 Oct 2021 05:55:40 -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=@kernel.org header.s=k20201202 header.b=IMqggbLY; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241085AbhJGLjg (ORCPT + 99 others); Thu, 7 Oct 2021 07:39:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:39958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbhJGLje (ORCPT ); Thu, 7 Oct 2021 07:39:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5E72861139; Thu, 7 Oct 2021 11:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633606660; bh=jon9QRneDnwbpXvgJ1AQzkE9ST+b9fV5l8WRP/UVnWQ=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=IMqggbLYJ/s05flqy/AskDxc/T0urdB6/cux0H912wXAYtmpJEIbqzaDiE2a+5wCS yGUtpSL8cAl/YiAAdHH3XThbVS30shkJtKpcQv3Vc+WDlrCVZ1waP/mHq2E6l2wQss 2u7GPkj+cvvgK5pJQhAtSaKSqFopFlXdu3TNeC/ltD6EDmY3lVfziNnXPUkGDmeIMh Lkrguz2Q/+H0qPpnGREX1G7ptB9Pk90Mr1Y6EG6oaxaay4stG9rY+6DgPMl5ZiG7BM 0Kr1erlOa18WZVFGJ+eCMCbl5b+sJ9EtctSoZ1TZzgamXHbcWWSJejMaKEkY/8dNtL TUarjORd64ViA== Date: Thu, 7 Oct 2021 13:37:37 +0200 (CEST) From: Jiri Kosina To: Cai Huoqing cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: cougar: Make use of the helper function devm_add_action_or_reset() In-Reply-To: <20210922125932.374-1-caihuoqing@baidu.com> Message-ID: References: <20210922125932.374-1-caihuoqing@baidu.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 Sep 2021, 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. Applied, thanks. -- Jiri Kosina SUSE Labs