lkml.org 
[lkml]   [2016]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: staging: comedi: usbdux: Split a condition check in usbdux_alloc_usb_buffers()
From
Date
> Actually, the original code worked fine,

I got my doubts when some memory allocations are attempted without checking
the desired success immediately.


> and these changes will result in an Oops if the allocations fail. I'll explain why,
> since it isn't obvious without some knowledge of the clean-up strategy used by comedi drivers:

Thanks for your explanation.


> …, and all the other comedi drivers follow the same strategy of leaving clean-up
> to their comedi 'detach' handler.

Are there other source code parts worth for further considerations?

Regards,
Markus

\
 
 \ /
  Last update: 2016-12-08 16:44    [W:1.305 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site