From: Colin King <colin.king@canonical.com>
To: Robert Baldyga <r.baldyga@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] tools: ffs-aio-example: fix uninitialized boolean variable 'ready'
Date: Mon, 11 Feb 2019 13:49:21 +0000 [thread overview]
Message-ID: <20190211134921.11975-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
The boolean variable is uninitialized and is only set if file
descriptor ep0 is ready. Fix this by ensuring the variable is
initialized by setting it to false.
Fixes: b34e08d5c706 ("tools: usb: aio example applications")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
index aaca1f44e788..1dda6e816b3c 100644
--- a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
+++ b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
@@ -246,7 +246,7 @@ int main(int argc, char *argv[])
struct io_buffer iobuf[2];
int actual = 0;
- bool ready;
+ bool ready = false;
if (argc != 2) {
printf("ffs directory not specified!\n");
--
2.20.1
reply other threads:[~2019-02-11 13:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190211134921.11975-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.baldyga@samsung.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;
as well as URLs for NNTP newsgroup(s).