Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1442555lqj; Tue, 4 Jun 2024 01:22:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVvQG11HvfrX4jVoSLJTBDECRxO0wRDzaPMtjkL8aI5fOKaEbQ/4aZ6azz//FS2JkobKiSUxX0PaK57bP+YMRFrt1hEkG4YFxbDKTGvgA== X-Google-Smtp-Source: AGHT+IF+xIQj9HgmueWJGmyQEPFUiGCwHI1BV5NiebacOc/SmtImGahSdWDpqOlGAgsaqhhEoS+g X-Received: by 2002:a05:6870:2199:b0:24c:bb34:cbac with SMTP id 586e51a60fabf-2508be96e23mr12823915fac.23.1717489349510; Tue, 04 Jun 2024 01:22:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717489349; cv=pass; d=google.com; s=arc-20160816; b=QbJrxziOIrRsd299nKXiKuTulT+YpJwClgmJ+YoezM29NFwH1cp7YdqZyjOCA/vil3 AjIxJPQ6YL/hR0tnXWQgjye7zIzoW/r+WoFqCH0SS+LTG5zlK1rFs9FbYGY1rNNb/QZa gZDGmJ4ChhxCN5w2uubWUtWTcRkjgd8FOqOH8YPdbm+XuRmjDquDUYFWYDwz9LdUiu5N XZHD2bUdIS2q7BFjgB+H9CvJBeE9aRBqdecdN5UITWYw0sB2K7t79NIP9cHw+uHduvGy MsgCmaYfKbA9mRKsZbMO/bn2pYk+ey4iRLcEZS85JQZLHgPquIdR40TSab3RP1uoMo2j 5UeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=SODKKUBQ+cXwUb7YZxxuGgfqzn9Ojr1U6VLDofT5S3Y=; fh=v8wNyvB/jUB3BHh/tinFkw9wBx9awiNe62pcoLHjhwo=; b=gz+ZM164/Wu/wx565xm8qc1D90xAF/IyhMhFjUZBNWXMNzlkwaaZR2yKMt7kkF4tmB erybitsselEp2B6Yhcc/TJ7pogluBoyl6KgtmhB2nYInh8mzY/Cu36dNFhRze6LxaV5l Xm1ayR8thq7Kyg+OQX1Ql0Ef5emgZ3qNEs4NeG5Oxpwuz34Tyosv/O0JtHwEd8rlmnQz EFR5sm+yDMuKXAUgpb1UGNtEDexehhkdtDTih416GQYwCmY1TpkQCDr5RqlPlBeM9r/e vGX5SDgijrutzCSqD+9yVZyGwwcSxoyWKxwxHYxxHc1gDw+vh2iFFfX5I7kt6/kEG6ZP yUGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rmgUPz2V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200242-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200242-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c95d92bb81si5306369a12.223.2024.06.04.01.22.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200242-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rmgUPz2V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200242-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200242-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 94BF7281F5C for ; Tue, 4 Jun 2024 08:21:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF47914264C; Tue, 4 Jun 2024 08:21:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rmgUPz2V" 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 F3FF12A1C5; Tue, 4 Jun 2024 08:21:24 +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=1717489285; cv=none; b=NP0SjPJ+P1ZNNVt8ck3YloweX/2rOMx7Hb6EcfMOhZAJXj3LvihGB2qczWAwqGai25/+2eVFG4MEirHnZryQQxMzfTjOxSyDn6bCH3hyJt3FIEIsHK0o0j4sCYUHqVX4rlYZINunl/rc2WPXVvRfBI8D6ljRp5wpSWbvDxd/lRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717489285; c=relaxed/simple; bh=tlI25W4DE2nYLkasA4v4U+4M++rc/Sj3aTcfd0rVEH8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=iRfGKrs26R+pBgI8V2dNvVWuX/6kWWEW4Iafi1kMquBdHLvjd7jJ4Dj93YWNplmSuUR2/QN3IKwWxPtGPJS25ZRP/5H5Ye7tY1tt+3fgZAbraONg3bA0GXh/d/sK/BmZ9kAnPSY4uSr1ugC/ooP/G+P5HoaNbwqr0hnYWwjtVpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rmgUPz2V; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19521C2BBFC; Tue, 4 Jun 2024 08:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717489284; bh=tlI25W4DE2nYLkasA4v4U+4M++rc/Sj3aTcfd0rVEH8=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=rmgUPz2VwGZs0qyQMr4wz+DAAMYU7BMBomeNMHxcZU3oLpQljmjL8Um06K5iXeDOX q3fTwdJTfc5ou/98WRGcHTkHjTZZYfEGc4Il1dXiC0mlEr327E/wNQc5FAGuMcKWJx BQxslO64zAAmdKKmd0Y+FvRSJ6QynXSyT2c3DGq5ptmCFBlG9gcHwPrq+iAP8kuR92 YKlpuaml0OWpCOKM8uA7R+7UUkiWM8iOqgw6wGQwjN+JsagWFVW3NioaAfU9lc0y7K STFW8pILMWwfHyLYRtI3vLM5Z3yROe3YDpReE9vPckwa4spJljSD8U8DGSK0+ixjvk lk+dXsWQP76gQ== Date: Tue, 4 Jun 2024 10:21:21 +0200 (CEST) From: Jiri Kosina To: Christophe JAILLET cc: "Daniel J. Ogorchock" , Benjamin Tissoires , Martino Fontana , Ryan McClelland , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH] HID: nintendo: Fix an error handling path in nintendo_hid_probe() In-Reply-To: <9e599978852f9a2f30f9523edfd220dd1e25aa63.1716735907.git.christophe.jaillet@wanadoo.fr> Message-ID: References: <9e599978852f9a2f30f9523edfd220dd1e25aa63.1716735907.git.christophe.jaillet@wanadoo.fr> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) 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 On Sun, 26 May 2024, Christophe JAILLET wrote: > joycon_leds_create() has a ida_alloc() call. So if an error occurs after > it, a corresponding ida_free() call is needed, as already done in the > .remove function. > > This is not 100% perfect, because if ida_alloc() fails, then > 'ctlr->player_id' will forced to be U32_MAX, and an error will be logged > when ida_free() is called. > > Considering that this can't happen in real life, no special handling is > done to handle it. > > Fixes: 5307de63d71d ("HID: nintendo: use ida for LED player id") > Signed-off-by: Christophe JAILLET Applied, thanks. -- Jiri Kosina SUSE Labs