From: Himangi Saraogi Date: Tue, 10 Jun 2014 14:18:47 +0000 (+0530) Subject: aic7xxx: Use kstrdup X-Git-Tag: omap-for-v3.17/fixes-against-rc2~143^2~70 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f3d2d9edc832bdd5507130446abf1c8d2923ac5;p=pandora-kernel.git aic7xxx: Use kstrdup 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 = E1 \| to = E1 \) if (to==NULL || ...) S ... when != \(from = E2 \| to = E2 \) - strcpy(to, from); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Christoph Hellwig --- Reading git-diff-tree failed