lkml.org 
[lkml]   [2014]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 09/10 linux-next] cdrom: remove unnecessary status
Date
cdrom_number_of_slots returns nslots and doesn't need status
variable. Just remove it and test cdrom_read_mech_status().

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/cdrom/cdrom.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index d397591..9a6fa8f 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1343,7 +1343,6 @@ out_free:
*/
int cdrom_number_of_slots(struct cdrom_device_info *cdi)
{
- int status;
int nslots = 1;
struct cdrom_changer_info *info;

@@ -1355,7 +1354,7 @@ int cdrom_number_of_slots(struct cdrom_device_info *cdi)
if (!info)
return -ENOMEM;

- if ((status = cdrom_read_mech_status(cdi, info)) == 0)
+ if (!cdrom_read_mech_status(cdi, info))
nslots = info->hdr.nslots;

kfree(info);
--
1.9.1


\
 
 \ /
  Last update: 2014-11-10 22:01    [W:0.071 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site