From: Greg KH <gregkh@linuxfoundation.org>
To: Thomas Andreatta <thomasandreatta2000@gmail.com>
Cc: dpenkler@gmail.com, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev,
Thomas Andreatta <thomas.andreatta2000@gmail.com>
Subject: Re: [PATCH 2/2] Staging: common: gpib_os: `request_system_control_ioctl` return value
Date: Sat, 10 May 2025 18:45:53 +0200 [thread overview]
Message-ID: <2025051046-ipad-overdrawn-8890@gregkh> (raw)
In-Reply-To: <20250510153800.130974-2-thomas.andreatta2000@gmail.com>
On Sat, May 10, 2025 at 05:38:00PM +0200, Thomas Andreatta wrote:
> `request_system_control_ioctl` now returns the value returned from the
> function `ibrsc`, now int.
>
> Signed-off-by: Thomas Andreatta <thomas.andreatta2000@gmail.com>
> ---
> drivers/staging/gpib/common/gpib_os.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
> index 8456b97290b8..dddf7a70084d 100644
> --- a/drivers/staging/gpib/common/gpib_os.c
> +++ b/drivers/staging/gpib/common/gpib_os.c
> @@ -1970,9 +1970,9 @@ static int request_system_control_ioctl(struct gpib_board *board, unsigned long
> if (retval)
> return -EFAULT;
>
> - ibrsc(board, request_control);
> + retval = ibrsc(board, request_control);
>
> - return 0;
> + return retval;
Why not:
return ibrsc(board, request_control);
?
But again, as this can not fail, why is this needed?
Start way back at the "ends" of the call chain. If they can fail, then
start propagating the error up all the way to here. As it is, your
patch series really didn't do anything that I can tell, sorry.
greg k-h
next prev parent reply other threads:[~2025-05-10 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-10 15:37 [PATCH 1/2] Staging: common: iblib: Changed ibrsc function type Thomas Andreatta
2025-05-10 15:38 ` [PATCH 2/2] Staging: common: gpib_os: `request_system_control_ioctl` return value Thomas Andreatta
2025-05-10 16:45 ` Greg KH [this message]
2025-05-10 17:43 ` [PATCH 2/2] Staging: common: gpib_os: simplify return value handling Thomas Andreatta
2025-05-10 16:44 ` [PATCH 1/2] Staging: common: iblib: Changed ibrsc function type Greg KH
2025-05-12 14:48 ` Dan Carpenter
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=2025051046-ipad-overdrawn-8890@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dpenkler@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=thomas.andreatta2000@gmail.com \
--cc=thomasandreatta2000@gmail.com \
/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