Tag: 1f3d2d9edc832bdd5507130446abf1c8d2923ac5

aic7xxx: Use kstrdup

Author: Himangi Saraogi <himangi774@gmail.com> Use kstrdup when the goal of an allocation is copy a string into the allocated region. The Coccinelle semantic patch that makes this change is as follows: // @@ expression from,to; expression flag,E1,E2; statement S; @@ – to = kmalloc(strlen(from) + 1,flag); + to = kstrdup(from, flag); … when != \(from …

Continue reading