Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp101901lqo; Wed, 15 May 2024 08:48:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJJEXuPrAIZSqaZd3uCBbMzRpE3r6q+n47QRe6wAm7MP6mJHegGe5iY2Ce3fjnZ0WZ9/tcnYhJWAO1EekNvwm4OrcjMW7pfb5gGxKlHA== X-Google-Smtp-Source: AGHT+IGngEI4pC0HgLyG7Xfm+HkHGcXYSYJkQMyG7sE725b1CitV+BhMJ9o228Z8HxQJvr2eC0/u X-Received: by 2002:a17:907:f95:b0:a5c:e16a:2d1a with SMTP id a640c23a62f3a-a5ce16a33bbmr2999866b.62.1715788110114; Wed, 15 May 2024 08:48:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715788110; cv=pass; d=google.com; s=arc-20160816; b=b/uw1QIwZV0jyhmV9gw/Z5WPyWKTmgcM/3TuSl09RnbnHaYZ6ojm1cwZKqK8usTizb bgCZShsmPzuSMsML6d9g3VlGFk2gHeG+5HZRvI5ZXXyBAiiTyF/GvQa4y1ndC1CQk38V 0s0q5fxnGvj3BUNNVC2lroo7AzYbCcCIx4nC9+HsRvSQeWhkUmzZvr8/uUSZ6t1qdSQm Na1xX77O0M/ne1ep1/AekrWrngX/UX+IKSu1182DnlS4Vg222l1/8PQESgIlG4UVRuYw R4g5K1Qml0bUYiT5EcOa5upt9cMy6K656z5f0P0A+QIItb/PYRfdTd/2yfZ6+Xze4Z+L HZSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nIrNWTNKk2DJ1zq774f4ME58k179Mgw6Y/SFcAQMCfk=; fh=qtrtWjX+LbQimWV8KHfw7ds7bHUE9Xei/wPBCROnGVQ=; b=OJbWPFg8XIZ9VXcQNt3/Js9liGL8rA1PXj8GV3wKyLWhKsKzdGjBHur6viqj35jCaF GZHZv7iZO8fENh+0guxtYos3S8LaSPgR0ge2BJ755oC9V7oeiFea/FFqgxjthDYXPOYc +CwDMEI3VXrV8OofRo74cujHibnPyt0mhAgyNSAjo4tc2nlxUaJTF+acvwOnAeW54aLD k+f9PsvEsyai9R1xAx+itKxLKeACKKsRf12VQ+WpnBSyiMNJ4qiMd44kQpVVZVOvaTGz VHBkTlb0wOlLK4MjxehsJgcwMF/2HXxGY24W8hxGX6F8o1u2yFF1UKuWHDNq/sTKwn7b oi3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S+OAg2gZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a179461ecsi721400466b.49.2024.05.15.08.48.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 08:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S+OAg2gZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B0C621F234B3 for ; Wed, 15 May 2024 15:48:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CD7A15623D; Wed, 15 May 2024 15:48:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S+OAg2gZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54587149DEE; Wed, 15 May 2024 15:48:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715788100; cv=none; b=lCPaneIAoIkR0TTL2zKUlxx2lc9PqzzbmsSSvApFKmPW3VWHUCMcBAxMSBRdJ/eeeB95IFBncYpWchuRm1IvyQ+jgzZaHm7BNYJr/O3adT/csmEEAtHMhqrEzh3tkn17Ln81cd1DLtT4fevrS17JpyK4wJwFI1JqQLlKOyIT43s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715788100; c=relaxed/simple; bh=tImvI4/XFN3XnDtRr36BCf27h4s5GzAbZmCDLw2EHcg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QuTc8rFNB6j6wQ6C5MDNjFkwkOvSmLtAVtFqrzqMlTyz19FyF4sxQO9T2JQHxs1TZFB7oMltutPhnBUK8lfQP39+RiHBzTer5s7J9OIY+lm00zK+v/yn8qYPer8BZePVFU1WwbxVBDfV2EzpExFJ8t+hDJsV3TMeCnDRp1/dGbQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S+OAg2gZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8092CC2BD11; Wed, 15 May 2024 15:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715788099; bh=tImvI4/XFN3XnDtRr36BCf27h4s5GzAbZmCDLw2EHcg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S+OAg2gZ2FE7raLUhsq+wQcFh3J2PdbMyP1Lvqc+tLmvRthjaoKM5U3OIcwvr0MxK +M2bRYzeAVbnYqZvMpZq/NXdq4bA22mmtT5psGQ7c52Tz8m9iyrkYFCIfzYXmanV7i kOpqtz3Vh0weCVJwPM7JlkCRFh8WIA+vZN+7A1siWdCLdyq9TzJJFNznPBl9eyoVbM YQny6DqQ/Bez/hYSn8DN3YQR45W7nSC12Bozzl/c/pGacfrv1e27ghE+DBn0OP1wA/ /HU/54LNY0QFBTcRDtYPGwGiI2L9zomwTfpw4pg1cfUkRRegDXFFXVhX9bGDUpSBj0 5LnnMEWZndmAA== Date: Wed, 15 May 2024 17:48:15 +0200 From: Benjamin Tissoires To: Rahul Rameshbabu Cc: Chen Ni , jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: nvidia-shield: Add missing check for input_ff_create_memless Message-ID: References: <20240515033051.2693390-1-nichen@iscas.ac.cn> <87jzjvgkn1.fsf@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87jzjvgkn1.fsf@nvidia.com> On May 15 2024, Rahul Rameshbabu wrote: > > On Wed, 15 May, 2024 11:30:51 +0800 Chen Ni wrote: > > Add check for the return value of input_ff_create_memless() and return > > the error if it fails in order to catch the error. > > > > You will need a Fixes: tag here. > > Fixes: 09308562d4af ("HID: nvidia-shield: Initial driver implementation with Thunderstrike support") > > Signed-off-by: Chen Ni > > --- > > drivers/hid/hid-nvidia-shield.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/hid/hid-nvidia-shield.c b/drivers/hid/hid-nvidia-shield.c > > index 58b15750dbb0..ff9078ad1961 100644 > > --- a/drivers/hid/hid-nvidia-shield.c > > +++ b/drivers/hid/hid-nvidia-shield.c > > @@ -283,7 +283,9 @@ static struct input_dev *shield_haptics_create( > > return haptics; > > > > input_set_capability(haptics, EV_FF, FF_RUMBLE); > > - input_ff_create_memless(haptics, NULL, play_effect); > > + ret = input_ff_create_memless(haptics, NULL, play_effect); > > + if (ret) > > + goto err; > > > > ret = input_register_device(haptics); > > if (ret) > > I applied and tested the patch locally, and it looked good. If Jiri or > Benjamin can apply the patch with the updated trailer, then you can add > my Reviewed-by: trailer. > > Reviewed-by: Rahul Rameshbabu Thanks a lot for the patch and the review. I wanted to apply it but we have a regression upstream on the CI because of an unrelated change in selftests: https://gitlab.freedesktop.org/bentiss/hid/-/jobs/58744845 Once this is sorted out I'll apply the patch (or Jiri will). FWIW, b4 applies the Fixes tag all by itself, so I don't have extra steps to do :) Cheers, Benjamin