[PATCH] Staging: speakup: kobjects: Return the error type to caller

Dan Carpenter dan.carpenter at oracle.com
Mon Dec 7 08:31:09 UTC 2015


On Mon, Dec 07, 2015 at 12:46:37PM +0530, Saurabh Sengar wrote:
> >> @@ -688,6 +689,8 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
> >>
> >>       if (ret == -ERESTART)
> >>               pr_info("%s reset to default value\n", param->name);
> >
> > Is this really true?
> Sorry, I am not sure here what you mean here.
> I have not implemented it.
> >
> > This function is so weird and broken.  Please look at it some more and
> > fix it harder with a mallet.
> You mean I broke it ?

No, I mean it was broken to begin with.  Write a more extensive patch to
fix it.

That printk should be moved up to where we actually do the reset.
Anyway speakup is actually really bad and there is a lot of broken
stuff so you don't have to fix this function if you don't want to.  Just
fix the -ERANGE issue I mentioned and resend if you want.

regards,
dan carpenter



More information about the devel mailing list