diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-05 21:52:57 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-07 02:16:21 -0400 |
| commit | db2a144bedd58b3dcf19950c2f476c58c9f39d18 (patch) | |
| tree | 931f1b5a8e6bafe388b317bce02a9fd9af309d38 /drivers/block/paride | |
| parent | a8ca889ed9585894d53fd8919d80cbe8baff09e7 (diff) | |
block_device_operations->release() should return void
The value passed is 0 in all but "it can never happen" cases (and those
only in a couple of drivers) *and* it would've been lost on the way
out anyway, even if something tried to pass something meaningful.
Just don't bother.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/paride')
| -rw-r--r-- | drivers/block/paride/pcd.c | 3 | ||||
| -rw-r--r-- | drivers/block/paride/pd.c | 4 | ||||
| -rw-r--r-- | drivers/block/paride/pf.c | 9 |
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index ba2b6b5e5910..e76bdc074dbe 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
| @@ -236,13 +236,12 @@ static int pcd_block_open(struct block_device *bdev, fmode_t mode) | |||
| 236 | return ret; | 236 | return ret; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int pcd_block_release(struct gendisk *disk, fmode_t mode) | 239 | static void pcd_block_release(struct gendisk *disk, fmode_t mode) |
| 240 | { | 240 | { |
| 241 | struct pcd_unit *cd = disk->private_data; | 241 | struct pcd_unit *cd = disk->private_data; |
| 242 | mutex_lock(&pcd_mutex); | 242 | mutex_lock(&pcd_mutex); |
| 243 | cdrom_release(&cd->info, mode); | 243 | cdrom_release(&cd->info, mode); |
| 244 | mutex_unlock(&pcd_mutex); | 244 | mutex_unlock(&pcd_mutex); |
| 245 | return 0; | ||
| 246 | } | 245 | } |
| 247 | 246 | ||
| 248 | static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode, | 247 | static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode, |
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 831e3ac156e6..19ad8f0c83ef 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
| @@ -783,7 +783,7 @@ static int pd_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 783 | } | 783 | } |
| 784 | } | 784 | } |
| 785 | 785 | ||
| 786 | static int pd_release(struct gendisk *p, fmode_t mode) | 786 | static void pd_release(struct gendisk *p, fmode_t mode) |
| 787 | { | 787 | { |
| 788 | struct pd_unit *disk = p->private_data; | 788 | struct pd_unit *disk = p->private_data; |
| 789 | 789 | ||
| @@ -791,8 +791,6 @@ static int pd_release(struct gendisk *p, fmode_t mode) | |||
| 791 | if (!--disk->access && disk->removable) | 791 | if (!--disk->access && disk->removable) |
| 792 | pd_special_command(disk, pd_door_unlock); | 792 | pd_special_command(disk, pd_door_unlock); |
| 793 | mutex_unlock(&pd_mutex); | 793 | mutex_unlock(&pd_mutex); |
| 794 | |||
| 795 | return 0; | ||
| 796 | } | 794 | } |
| 797 | 795 | ||
| 798 | static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing) | 796 | static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing) |
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); |
| 212 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 212 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
| 213 | 213 | ||
| 214 | static int pf_release(struct gendisk *disk, fmode_t mode); | 214 | static void pf_release(struct gendisk *disk, fmode_t mode); |
| 215 | 215 | ||
| 216 | static int pf_detect(void); | 216 | static int pf_detect(void); |
| 217 | static void do_pf_read(void); | 217 | static 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 | ||
| 363 | static int pf_release(struct gendisk *disk, fmode_t mode) | 363 | static 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 | ||
| 383 | static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) | 382 | static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) |
