* [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
* Re: [PATCH] Greybus audio protocols drivers: correct sscanf() return value check
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
1 sibling, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-11 7:54 UTC (permalink / raw)
To: Alexander A. Klimov
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
greybus-dev, linux-staging, Linux Kernel Mailing List
On Sun, May 10, 2026 at 08:41:43PM +0200, Alexander A. Klimov wrote:
> 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
>
>
Cool, but was this tested? How has this ever worked?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Greybus audio protocols drivers: correct sscanf() return value check
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
1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2026-05-11 9:11 UTC (permalink / raw)
To: Alexander A. Klimov
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
Greg Kroah-Hartman, greybus-dev, linux-staging,
Linux Kernel Mailing List
On Sun, May 10, 2026 at 08:41:43PM +0200, Alexander A. Klimov wrote:
> 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>
> ---
This needs a Fixes tag.
Fixes: 49b9137a6002 ("staging: greybus: audio: remove redundant slot field")
You need to add Pankaj Bharadiya <pankaj.bharadiya@gmail.com> to the
CC list. Although that patch is from 10 years ago so it means no one is
using this.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] Greybus audio protocols drivers: correct sscanf() return value check
2026-05-11 9:11 ` Dan Carpenter
@ 2026-05-11 20:10 ` Alexander A. Klimov
0 siblings, 0 replies; 4+ messages in thread
From: Alexander A. Klimov @ 2026-05-11 20:10 UTC (permalink / raw)
To: Dan Carpenter
Cc: Vaibhav Agarwal, Mark Greer, Johan Hovold, Alex Elder,
Greg Kroah-Hartman, greybus-dev, linux-staging,
Linux Kernel Mailing List, Pankaj Bharadiya
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
^ 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