The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] Greybus audio protocols drivers: correct sscanf() return value check
@ 2026-05-10 18:41 Alexander A. Klimov
  2026-05-11  7:54 ` Greg Kroah-Hartman
  2026-05-11  9:11 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander A. Klimov @ 2026-05-10 18:41 UTC (permalink / raw)
  To: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
	Greg Kroah-Hartman
  Cc: greybus-dev, linux-staging, Linux Kernel Mailing List

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

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-11 20:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [PATCH v2] " Alexander A. Klimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox