diff options
author | Julia Lawall | 2010-05-11 20:26:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-05-12 01:06:48 +0200 |
commit | 324148788bf3744d90fb6894ec5744eb0ca91b74 (patch) | |
tree | bb6a978e2c0ee43fd1588a898e9277f619b31c91 /drivers/staging/cx25821/cx25821-audio-upstream.c | |
parent | Staging: wlan-ng: Fixed non static functions in prism2fw.c (diff) | |
download | kernel-qcow2-linux-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.gz kernel-qcow2-linux-324148788bf3744d90fb6894ec5744eb0ca91b74.tar.xz kernel-qcow2-linux-324148788bf3744d90fb6894ec5744eb0ca91b74.zip |
Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
@@
- (T *)
(\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/cx25821/cx25821-audio-upstream.c')
-rw-r--r-- | drivers/staging/cx25821/cx25821-audio-upstream.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/cx25821/cx25821-audio-upstream.c b/drivers/staging/cx25821/cx25821-audio-upstream.c index 11c56bdb0ceb..4c7d21e3d54d 100644 --- a/drivers/staging/cx25821/cx25821-audio-upstream.c +++ b/drivers/staging/cx25821/cx25821-audio-upstream.c @@ -751,8 +751,7 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) if (dev->input_audiofilename) { str_length = strlen(dev->input_audiofilename); - dev->_audiofilename = - (char *)kmalloc(str_length + 1, GFP_KERNEL); + dev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL); if (!dev->_audiofilename) goto error; @@ -766,8 +765,7 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) } } else { str_length = strlen(_defaultAudioName); - dev->_audiofilename = - (char *)kmalloc(str_length + 1, GFP_KERNEL); + dev->_audiofilename = kmalloc(str_length + 1, GFP_KERNEL); if (!dev->_audiofilename) goto error; |