aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/sbpcd.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-09-10 03:26:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 13:06:30 -0400
commitf9101210e7aa72daf92722d451a2f7e3af5f781f (patch)
tree9554007e19387f2d05352ab03332be50c5b95f5b /drivers/cdrom/sbpcd.c
parent887c27f369abc458556a5ce8ab22ddd498474307 (diff)
[PATCH] vfree and kfree cleanup in drivers/
This patch does a full cleanup of 'NULL checks before vfree', and a partial cleanup of calls to kfree for all of drivers/ - the kfree bit is partial in that I only did the files that also had vfree calls in them. The patch also gets rid of some redundant (void *) casts of pointers being passed to [vk]free, and a some tiny whitespace corrections also crept in. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom/sbpcd.c')
-rw-r--r--drivers/cdrom/sbpcd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index 30a897755361..0b7d7412c4a5 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -4216,7 +4216,8 @@ static int sbpcd_dev_ioctl(struct cdrom_device_info *cdi, u_int cmd,
4216 4216
4217 case CDROMAUDIOBUFSIZ: /* configure the audio buffer size */ 4217 case CDROMAUDIOBUFSIZ: /* configure the audio buffer size */
4218 msg(DBG_IOC,"ioctl: CDROMAUDIOBUFSIZ entered.\n"); 4218 msg(DBG_IOC,"ioctl: CDROMAUDIOBUFSIZ entered.\n");
4219 if (current_drive->sbp_audsiz>0) vfree(current_drive->aud_buf); 4219 if (current_drive->sbp_audsiz>0)
4220 vfree(current_drive->aud_buf);
4220 current_drive->aud_buf=NULL; 4221 current_drive->aud_buf=NULL;
4221 current_drive->sbp_audsiz=arg; 4222 current_drive->sbp_audsiz=arg;
4222 4223
@@ -5910,7 +5911,8 @@ static void sbpcd_exit(void)
5910 put_disk(D_S[j].disk); 5911 put_disk(D_S[j].disk);
5911 devfs_remove("sbp/c0t%d", j); 5912 devfs_remove("sbp/c0t%d", j);
5912 vfree(D_S[j].sbp_buf); 5913 vfree(D_S[j].sbp_buf);
5913 if (D_S[j].sbp_audsiz>0) vfree(D_S[j].aud_buf); 5914 if (D_S[j].sbp_audsiz>0)
5915 vfree(D_S[j].aud_buf);
5914 if ((unregister_cdrom(D_S[j].sbpcd_infop) == -EINVAL)) 5916 if ((unregister_cdrom(D_S[j].sbpcd_infop) == -EINVAL))
5915 { 5917 {
5916 msg(DBG_INF, "What's that: can't unregister info %s.\n", major_name); 5918 msg(DBG_INF, "What's that: can't unregister info %s.\n", major_name);