All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Alfie Varghese <alfievarghese22@gmail.com>
Cc: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: uart: return tty_alloc_driver() errors
Date: Tue, 14 Jul 2026 10:04:55 +0300	[thread overview]
Message-ID: <alXfl0fLlc3VrGUG@stanley.mountain> (raw)
In-Reply-To: <20260713170845.1518-1-alfievarghese22@gmail.com>

On Mon, Jul 13, 2026 at 10:38:45PM +0530, Alfie Varghese wrote:
> gb_tty_init() maps any tty_alloc_driver() failure to -ENOMEM. This
> loses the real errno returned by the driver core and makes failures
> harder to diagnose correctly.
> 
> Return PTR_ERR(gb_tty_driver) instead so callers receive the actual
> failure reason while preserving the existing cleanup path.
> 
> Signed-off-by: Alfie Varghese <alfievarghese22@gmail.com>
> ---

I don't have a problem with this change but the commit message
should say that tty_alloc_driver() in this case always returns
-ENOMEM so this is just a style fix and not anything which matters.

regards,
dan carpenter


      reply	other threads:[~2026-07-14  7:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 17:08 [PATCH] staging: greybus: uart: return tty_alloc_driver() errors Alfie Varghese
2026-07-14  7:04 ` Dan Carpenter [this message]

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=alXfl0fLlc3VrGUG@stanley.mountain \
    --to=error27@gmail.com \
    --cc=alfievarghese22@gmail.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.