staging: greybus: vibrator: return device_create() errors
PATCH 1/1 staging: greybus: vibrator: return device_create() errors
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.
--- drivers/staging/greybus/vibrator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/vibrator.c +1 -1
@@ -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;
Signature · 1 line
2.54.0.windows.1
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.
Greg KH
maintainerQuoted 1 line · Alfie Varghese
Gentle ping on this patch from May 28.
What patch? I have no context here, sorry.
Quoted 3 lines
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