Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: vibrator: return device_create() errors
@ 2026-05-28 13:51 Alfie Varghese
  2026-06-18  4:01 ` Alfie Varghese
  0 siblings, 1 reply; 4+ messages in thread
From: Alfie Varghese @ 2026-05-28 13:51 UTC (permalink / raw)
  To: Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: greybus-dev, linux-staging, linux-kernel, Alfie Varghese

gb_vibrator_probe() maps any device_create() failure to -EINVAL. This
loses the real errno returned by the driver core, such as -ENOMEM, and
makes probe failures harder to diagnose correctly.

Return PTR_ERR(dev) instead so callers receive the actual failure reason
while preserving the existing cleanup path.

Signed-off-by: Alfie Varghese <alfievarghese22@gmail.com>
---
 drivers/staging/greybus/vibrator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 0ec4d317c..763c234fb 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -161,7 +161,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
 	dev = device_create(&vibrator_class, &bundle->dev,
 			    MKDEV(0, 0), vib, "vibrator%d", vib->minor);
 	if (IS_ERR(dev)) {
-		retval = -EINVAL;
+		retval = PTR_ERR(dev);
 		goto err_ida_remove;
 	}
 	vib->dev = dev;
-- 
2.54.0.windows.1


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

* [PATCH] staging: greybus: vibrator: return device_create() errors
@ 2026-05-28 13:52 Alfie Varghese
  0 siblings, 0 replies; 4+ messages in thread
From: Alfie Varghese @ 2026-05-28 13:52 UTC (permalink / raw)
  To: Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: greybus-dev, linux-staging, linux-kernel, Alfie Varghese

gb_vibrator_probe() maps any device_create() failure to -EINVAL. This
loses the real errno returned by the driver core, such as -ENOMEM, and
makes probe failures harder to diagnose correctly.

Return PTR_ERR(dev) instead so callers receive the actual failure reason
while preserving the existing cleanup path.

Signed-off-by: Alfie Varghese <alfievarghese22@gmail.com>
---
 drivers/staging/greybus/vibrator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 0ec4d317c..763c234fb 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -161,7 +161,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
 	dev = device_create(&vibrator_class, &bundle->dev,
 			    MKDEV(0, 0), vib, "vibrator%d", vib->minor);
 	if (IS_ERR(dev)) {
-		retval = -EINVAL;
+		retval = PTR_ERR(dev);
 		goto err_ida_remove;
 	}
 	vib->dev = dev;
-- 
2.54.0.windows.1


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

* Re: [PATCH] staging: greybus: vibrator: return device_create() errors
  2026-05-28 13:51 [PATCH] staging: greybus: vibrator: return device_create() errors Alfie Varghese
@ 2026-06-18  4:01 ` Alfie Varghese
  2026-06-18 10:38   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Alfie Varghese @ 2026-06-18  4:01 UTC (permalink / raw)
  To: johan, elder, gregkh; +Cc: greybus-dev, linux-staging, linux-kernel

Gentle ping on this patch from May 28.

Apologies for the accidental duplicate send; a second copy went out
shortly after this one by mistake. This thread is the canonical one to
review.

Happy to resend or rework if anything is needed.

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

* Re: [PATCH] staging: greybus: vibrator: return device_create() errors
  2026-06-18  4:01 ` Alfie Varghese
@ 2026-06-18 10:38   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-06-18 10:38 UTC (permalink / raw)
  To: Alfie Varghese; +Cc: johan, elder, greybus-dev, linux-staging, linux-kernel

On Thu, Jun 18, 2026 at 04:01:32AM +0000, Alfie Varghese wrote:
> Gentle ping on this patch from May 28.

What patch?  I have no context here, sorry.

> Apologies for the accidental duplicate send; a second copy went out
> shortly after this one by mistake. This thread is the canonical one to
> review.

If you sent two different ones, always properly version them so we know
which one should be reviewed.

And its the merge window right now, nothing can happen until after -rc1
is out, thanks,

greg k-h

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

end of thread, other threads:[~2026-06-18 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 13:51 [PATCH] staging: greybus: vibrator: return device_create() errors Alfie Varghese
2026-06-18  4:01 ` Alfie Varghese
2026-06-18 10:38   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2026-05-28 13:52 Alfie Varghese

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