[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2406041021130.16865@cbobk.fhfr.pm>
Date: Tue, 4 Jun 2024 10:21:21 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
cc: "Daniel J. Ogorchock" <djogorchock@...il.com>,
Benjamin Tissoires <bentiss@...nel.org>,
Martino Fontana <tinozzo123@...il.com>,
Ryan McClelland <rymcclel@...il.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH] HID: nintendo: Fix an error handling path in
nintendo_hid_probe()
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 <christophe.jaillet@...adoo.fr>
Applied, thanks.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists