[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0af8328-52c4-e5f8-5e11-36f95f32e735@suse.com>
Date: Mon, 6 Sep 2021 15:02:43 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Johan Hovold <johan@...nel.org>, Oliver Neukum <oneukum@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Jaejoong Kim <climbbb.kim@...il.com>
Subject: Re: [PATCH] USB: cdc-acm: fix minor-number release
On 06.09.21 14:43, Johan Hovold wrote:
> @@ -1323,8 +1324,10 @@ static int acm_probe(struct usb_interface *intf,
> usb_get_intf(acm->control); /* undone in destruct() */
>
> minor = acm_alloc_minor(acm);
> - if (minor < 0)
> + if (minor < 0) {
> + acm->minor = ACM_TTY_MINORS;
> goto err_put_port;
Hi,
Congratulations for catching that one.
May I request to improve understandability of the code that you give
the constant a distinct name for this purpose? Something like
ACM_MINOR_POISON or ACM_INVALID_MINOR
so that normal people can understand the fixed code?
Regards
Oliver
Powered by blists - more mailing lists