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 08/10 linux-next] cdrom: fix init_cdrom_command in dvd_do_auth
Date
Remove memset 0 (init_cdrom_command already does it)
and send sizeof(buf) instead of 0 for buffer size.

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 9b08f91..d397591 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1639,8 +1639,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
struct cdrom_device_ops *cdo = cdi->ops;
rpc_state_t rpc_state;

- memset(buf, 0, sizeof(buf));
- init_cdrom_command(&cgc, buf, 0, CGC_DATA_READ);
+ init_cdrom_command(&cgc, buf, sizeof(buf), CGC_DATA_READ);

switch (ai->type) {
/* LU data send */
--
1.9.1


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