Commit c8e8b193 authored by Jesper Juhl's avatar Jesper Juhl Committed by Kyle McMartin

[PARISC] kfree cleanups to ioctl32.c

2.6.12-rc2-pa2 kfree cleanups from Jesper Juhl
Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarGrant Grundler <grundler@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent b8db8002
...@@ -104,11 +104,8 @@ static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -104,11 +104,8 @@ static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
out: out:
if (kversion.name)
kfree(kversion.name); kfree(kversion.name);
if (kversion.date)
kfree(kversion.date); kfree(kversion.date);
if (kversion.desc)
kfree(kversion.desc); kfree(kversion.desc);
return ret; return ret;
} }
...@@ -166,9 +163,7 @@ static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long a ...@@ -166,9 +163,7 @@ static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long a
ret = -EFAULT; ret = -EFAULT;
} }
if (karg.unique != NULL)
kfree(karg.unique); kfree(karg.unique);
return ret; return ret;
} }
...@@ -265,7 +260,6 @@ static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -265,7 +260,6 @@ static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
kfree(karg.list); kfree(karg.list);
return ret; return ret;
} }
...@@ -305,7 +299,6 @@ static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -305,7 +299,6 @@ static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
out: out:
kfree(karg.list); kfree(karg.list);
return ret; return ret;
} }
...@@ -494,15 +487,10 @@ static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -494,15 +487,10 @@ static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg)
} }
out: out:
if (karg.send_indices)
kfree(karg.send_indices); kfree(karg.send_indices);
if (karg.send_sizes)
kfree(karg.send_sizes); kfree(karg.send_sizes);
if (karg.request_indices)
kfree(karg.request_indices); kfree(karg.request_indices);
if (karg.request_sizes)
kfree(karg.request_sizes); kfree(karg.request_sizes);
return ret; return ret;
} }
...@@ -555,9 +543,7 @@ static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg) ...@@ -555,9 +543,7 @@ static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg)
ret = -EFAULT; ret = -EFAULT;
} }
if (karg.contexts)
kfree(karg.contexts); kfree(karg.contexts);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment