[lkml]   [2019]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] nvmem: core: fix the return value check when calling the notifier chain

On 15/02/2019 09:41, Bartosz Golaszewski wrote:
>> rval will be masked with STOP MASK, so the above statement could be
>> false even if we have error.
>> So you should consider returning an errono which can be understood by user:
>> may be something like this:
>> if (rval & NOTIFY_STOP_MASK) {
>> rval = notifier_to_errno(rval);
>> goto err_remove_cells
>> }
> Actually I'm now thinking we can remove this check at all - most users
> never check the return values of notifier chain calls. This function
> cannot fail in itself. What do you think?
Thats even better, I was about to suggest the same on the fact that we
should allow nvmem provider to register to be successful irrespective of
the notifier callback failures.


 \ /
  Last update: 2019-02-15 11:26    [W:0.061 / U:11.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site