Linux kernel staging patches
 help / color / mirror / Atom feed
From: "Alexander A. Klimov" <grandmaster@al2klimov.de>
To: Dan Carpenter <error27@gmail.com>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>,
	Mark Greer <mgreer@animalcreek.com>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Subject: [PATCH v2] Greybus audio protocols drivers: correct sscanf() return value check
Date: Mon, 11 May 2026 22:10:16 +0200	[thread overview]
Message-ID: <c17dd24c-2bf1-4ef8-a8d3-79014a75242f@al2klimov.de> (raw)
In-Reply-To: <agGdJFofiZYKqqhr@stanley.mountain>

manager_sysfs_add_store() passes 6 pointers to sscanf(),
but required latter to return 7 which failed the operation.
I corrected it to 6.

Fixes: 49b9137a6002 ("staging: greybus: audio: remove redundant slot field")
Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
---
  drivers/staging/greybus/audio_manager_sysfs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/audio_manager_sysfs.c b/drivers/staging/greybus/audio_manager_sysfs.c
index fcd518f954..ff323ca815 100644
--- a/drivers/staging/greybus/audio_manager_sysfs.c
+++ b/drivers/staging/greybus/audio_manager_sysfs.c
@@ -23,7 +23,7 @@ static ssize_t manager_sysfs_add_store(struct kobject *kobj,
  			desc.name, &desc.vid, &desc.pid, &desc.intf_id,
  			&desc.ip_devices, &desc.op_devices);

-	if (num != 7)
+	if (num != 6)
  		return -EINVAL;

  	num = gb_audio_manager_add(&desc);
-- 
2.54.0


  reply	other threads:[~2026-05-11 20:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 18:41 [PATCH] Greybus audio protocols drivers: correct sscanf() return value check Alexander A. Klimov
2026-05-11  7:54 ` Greg Kroah-Hartman
2026-05-11  9:11 ` Dan Carpenter
2026-05-11 20:10   ` Alexander A. Klimov [this message]
2026-05-12  5:35     ` [PATCH v2] " Greg Kroah-Hartman
2026-05-12 19:15       ` [PATCH v3] staging: greybus: audio: " Alexander A. Klimov
2026-05-12 20:07         ` Alex Elder

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=c17dd24c-2bf1-4ef8-a8d3-79014a75242f@al2klimov.de \
    --to=grandmaster@al2klimov.de \
    --cc=elder@kernel.org \
    --cc=error27@gmail.com \
    --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 \
    --cc=mgreer@animalcreek.com \
    --cc=pankaj.bharadiya@gmail.com \
    --cc=vaibhav.sr@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