yaoxinjing / simpleDeviceDriver

0 stars 0 forks source link

Return -ENOMEM #7

Closed planetA closed 3 years ago

planetA commented 3 years ago

https://github.com/yaoxinjing/simpleDeviceDriver/blob/575ebb004b1771e8767032e12f068a7123ba28c3/device_file.c#L66-L67

If memory allocation failed, you need to return -ENOMEM. You cannot continue execution.

yaoxinjing commented 3 years ago

thanks , i have checked this error and return -ENOMEM if there is error