aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/ioctl32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/ioctl32.c')
-rw-r--r--arch/parisc/kernel/ioctl32.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/arch/parisc/kernel/ioctl32.c b/arch/parisc/kernel/ioctl32.c
index 1d3824b670d1..8cad8f004f00 100644
--- a/arch/parisc/kernel/ioctl32.c
+++ b/arch/parisc/kernel/ioctl32.c
@@ -104,12 +104,9 @@ static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg)
104 } 104 }
105 105
106out: 106out:
107 if (kversion.name) 107 kfree(kversion.name);
108 kfree(kversion.name); 108 kfree(kversion.date);
109 if (kversion.date) 109 kfree(kversion.desc);
110 kfree(kversion.date);
111 if (kversion.desc)
112 kfree(kversion.desc);
113 return ret; 110 return ret;
114} 111}
115 112
@@ -166,9 +163,7 @@ static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long a
166 ret = -EFAULT; 163 ret = -EFAULT;
167 } 164 }
168 165
169 if (karg.unique != NULL) 166 kfree(karg.unique);
170 kfree(karg.unique);
171
172 return ret; 167 return ret;
173} 168}
174 169
@@ -265,7 +260,6 @@ static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
265 } 260 }
266 261
267 kfree(karg.list); 262 kfree(karg.list);
268
269 return ret; 263 return ret;
270} 264}
271 265
@@ -305,7 +299,6 @@ static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg)
305 299
306out: 300out:
307 kfree(karg.list); 301 kfree(karg.list);
308
309 return ret; 302 return ret;
310} 303}
311 304
@@ -494,15 +487,10 @@ static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg)
494 } 487 }
495 488
496out: 489out:
497 if (karg.send_indices) 490 kfree(karg.send_indices);
498 kfree(karg.send_indices); 491 kfree(karg.send_sizes);
499 if (karg.send_sizes) 492 kfree(karg.request_indices);
500 kfree(karg.send_sizes); 493 kfree(karg.request_sizes);
501 if (karg.request_indices)
502 kfree(karg.request_indices);
503 if (karg.request_sizes)
504 kfree(karg.request_sizes);
505
506 return ret; 494 return ret;
507} 495}
508 496
@@ -555,9 +543,7 @@ static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg)
555 ret = -EFAULT; 543 ret = -EFAULT;
556 } 544 }
557 545
558 if (karg.contexts) 546 kfree(karg.contexts);
559 kfree(karg.contexts);
560
561 return ret; 547 return ret;
562} 548}
563 549