Himangi Saraogi 1f3d2d9edc 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:

// <smpl>
@@
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);
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-07-25 17:16:54 -04:00
..
2012-02-05 17:14:46 +01:00
2014-07-25 17:16:54 -04:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:26 -04:00
2014-07-17 22:07:37 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2014-07-25 17:16:54 -04:00
2014-07-17 22:07:37 +02:00
2013-04-09 14:13:25 -04:00
2014-07-17 22:07:37 +02:00
2014-07-17 22:07:37 +02:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2014-07-25 17:16:54 -04:00