From 57a1147f7b6c9e7c736477239c1232e55bf83f2c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 18 Nov 2005 22:02:44 +0100 Subject: [PATCH] --- yaml --- r: 14445 b: refs/heads/master c: 15534d3803993345d8db32246ec329d8f83502e1 h: refs/heads/master i: 14443: 22a06edc7a73b178083f1bdea22f1877aed43183 v: v3 --- [refs] | 2 +- trunk/drivers/block/cciss.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 2a7e2172ba7b..8f0c7718f112 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f0d50391adf371a0e66da0a1a44ba5cc6744ee8 +refs/heads/master: 15534d3803993345d8db32246ec329d8f83502e1 diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index e239a6c29230..33f8341887d0 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -1017,10 +1017,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, status = -ENOMEM; goto cleanup1; } - if (ioc->Request.Type.Direction == XFER_WRITE && - copy_from_user(buff[sg_used], data_ptr, sz)) { + if (ioc->Request.Type.Direction == XFER_WRITE) { + if (copy_from_user(buff[sg_used], data_ptr, sz)) { status = -ENOMEM; - goto cleanup1; + goto cleanup1; + } } else { memset(buff[sg_used], 0, sz); }