aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/paride/pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/paride/pf.c')
-rw-r--r--drivers/block/paride/pf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index ec8f9ed6326e..f5c86d523ba0 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -211,7 +211,7 @@ static int pf_ioctl(struct block_device *bdev, fmode_t mode,
211 unsigned int cmd, unsigned long arg); 211 unsigned int cmd, unsigned long arg);
212static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); 212static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo);
213 213
214static int pf_release(struct gendisk *disk, fmode_t mode); 214static void pf_release(struct gendisk *disk, fmode_t mode);
215 215
216static int pf_detect(void); 216static int pf_detect(void);
217static void do_pf_read(void); 217static void do_pf_read(void);
@@ -360,14 +360,15 @@ static int pf_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, u
360 return 0; 360 return 0;
361} 361}
362 362
363static int pf_release(struct gendisk *disk, fmode_t mode) 363static void pf_release(struct gendisk *disk, fmode_t mode)
364{ 364{
365 struct pf_unit *pf = disk->private_data; 365 struct pf_unit *pf = disk->private_data;
366 366
367 mutex_lock(&pf_mutex); 367 mutex_lock(&pf_mutex);
368 if (pf->access <= 0) { 368 if (pf->access <= 0) {
369 mutex_unlock(&pf_mutex); 369 mutex_unlock(&pf_mutex);
370 return -EINVAL; 370 WARN_ON(1);
371 return;
371 } 372 }
372 373
373 pf->access--; 374 pf->access--;
@@ -376,8 +377,6 @@ static int pf_release(struct gendisk *disk, fmode_t mode)
376 pf_lock(pf, 0); 377 pf_lock(pf, 0);
377 378
378 mutex_unlock(&pf_mutex); 379 mutex_unlock(&pf_mutex);
379 return 0;
380
381} 380}
382 381
383static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) 382static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing)