public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net
Subject: Re: [PATCH] usb: storage: freecom: drop useless assignment in init_freecom()
Date: Mon, 4 Dec 2023 08:04:36 +0100	[thread overview]
Message-ID: <2023120412-observing-affluent-9432@gregkh> (raw)
In-Reply-To: <4d3fb70f-bf2f-96cc-a8fb-1ef658a24920@omp.ru>

On Wed, Nov 29, 2023 at 11:43:50PM +0300, Sergey Shtylyov wrote:
> In init_freecom(), the results of usb_stor_control_msg() calls are stored
> in the local variable and then printed out by usb_stor_dbg() (if enabled),
> except for the 1st call, the result of which is completely ignored.  Drop
> the useless assignment.

Instead, you should check the return value and handle it properly, don't
just drop the checking entirely, that's not good.

thanks,

greg k-h

  reply	other threads:[~2023-12-04 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 20:43 [PATCH] usb: storage: freecom: drop useless assignment in init_freecom() Sergey Shtylyov
2023-12-04  7:04 ` Greg Kroah-Hartman [this message]
2023-12-07 16:16   ` Sergey Shtylyov
2024-01-22 18:26     ` Sergey Shtylyov
2024-01-22 18:53       ` Alan Stern

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=2023120412-observing-affluent-9432@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=s.shtylyov@omp.ru \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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