mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH v4] usb: hub: Set proper message when usb_hub_create_port_device() fails
Date: Mon, 12 Oct 2026 23:53:00 +0300	[thread overview]
Message-ID: <as1IrOAaNLuSqtEU@ashevche-desk.local> (raw)
In-Reply-To: <20261012092725.575885-1-wenst@chromium.org>

On Mon, Oct 12, 2026 at 05:27:24PM +0800, Chen-Yu Tsai wrote:
> Right now when usb_hub_create_port_device() fails, it prints a separate
> error message to say which port failed, but otherwise leaves |message|
> set to the default "out of memory", which is somewhat misleading.
> 
> Set |message| to an error message that is more specific to this error
> path instead of using the default "out of memory" message.

...

>  		if (ret < 0) {
>  			dev_err(hub->intfdev,
>  				"couldn't create port%d device.\n", i + 1);
> +			message = "couldn't create port device";
>  			break;

We can now even use

			message = "couldn't create port device";
			dev_err(hub->intfdev, "%s %d.\n", message, + 1);

>  		}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-10-12 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12  9:27 Chen-Yu Tsai
2026-10-12 20:53 ` Andy Shevchenko [this message]
2026-10-12 21:24   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=as1IrOAaNLuSqtEU@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®