archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <>
	Chunfeng Yun <>,
	Greg Kroah-Hartman <>,
	Matthias Brugger <>
Cc: Colin Ian King <>,,
	LKML <>
Subject: usb: mtu3: Checking initialisation of the variable  =?UTF-8?B?4oCcbWVw4oCdIGluIHR3by
Date: Sat, 27 Jun 2020 12:28:50 +0000	[thread overview]
Message-ID: <> (raw)


A source code analysis approach by the means of the semantic patch language
(Coccinelle software) pointed an implementation detail out for further
development considerations.

The functions “mtu3_gadget_ep_set_halt” and “mtu3_gadget_ep_set_wedge” check
at the beginning if the input parameter “ep” is a null pointer.
The error code “-EINVAL” will be returned then.

Can it be nicer to assign the variable “mep” only after a successful check
instead of an initialisation before?


             reply	other threads:[~2020-06-27 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27 12:28 Markus Elfring [this message]
2020-06-29  1:48 ` usb: mtu3: Checking initialisation of the variable “mep” in two func Chunfeng Yun

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).