From: Johan Hovold <johan@kernel.org> Date: 2021-05-19 12:47:51
Commit 31db0dbd7244 ("net: hso: check for allocation failure in
hso_create_bulk_serial_device()") recently started returning an error
when the driver fails to allocate resources for the interrupt endpoint
and tiocmget functionality.
For consistency let's bail out from probe also if the URB allocation
fails.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/usb/hso.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
From: Dan Carpenter <hidden> Date: 2021-05-19 13:23:20
On Wed, May 19, 2021 at 02:47:17PM +0200, Johan Hovold wrote:
quoted hunk
Commit 31db0dbd7244 ("net: hso: check for allocation failure in
hso_create_bulk_serial_device()") recently started returning an error
when the driver fails to allocate resources for the interrupt endpoint
and tiocmget functionality.
For consistency let's bail out from probe also if the URB allocation
fails.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/usb/hso.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Thanks! The original code works, but it's so suspicious looking because
you would think hso_free_tiomget() lead to a use after free later.
Reviewed-by: Dan Carpenter <redacted>
regards,
dan carpenter
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 19 May 2021 14:47:17 +0200 you wrote:
Commit 31db0dbd7244 ("net: hso: check for allocation failure in
hso_create_bulk_serial_device()") recently started returning an error
when the driver fails to allocate resources for the interrupt endpoint
and tiocmget functionality.
For consistency let's bail out from probe also if the URB allocation
fails.
[...]