Tag: 7c81aafaf059b81ead2330bc13db78269ef62612

USB: gadget: Return -ENOMEM on memory allocation failure

Author: Julia Lawall <julia@diku.dk> In this code, 0 is returned on memory allocation failure, even though other failures return -ENOMEM or other similar values. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression ret; expression x,e1,e2,e3; @@ ret = 0 … when != ret = e1 …

Continue reading