Skip to content

Commit

Permalink
media-radio-miropcm20-rds: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent b9bde77 commit cad8423
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/radio/miropcm20-rds.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
Expand All @@ -27,13 +28,16 @@ static int rds_f_open(struct inode *in, struct file *fi)
if (rds_users)
return -EBUSY;

lock_kernel();
rds_users++;
if ((text_buffer=kmalloc(66, GFP_KERNEL)) == 0) {
rds_users--;
printk(KERN_NOTICE "aci-rds: Out of memory by open()...\n");
unlock_kernel();
return -ENOMEM;
}

unlock_kernel();
return 0;
}

Expand Down

0 comments on commit cad8423

Please sign in to comment.