hpsa.c (d1fea47c36c13df5fc7e5a379ed5c4d2059de583) hpsa.c (0758f4f732b08b6ef07f2e5f735655cf69fea477)
1/*
2 * Disk Array driver for HP Smart Array SAS controllers
3 * Copyright 2000, 2014 Hewlett-Packard Development Company, L.P.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *

--- 5079 unchanged lines hidden (view full) ---

5088 buff_size[sg_used] = sz;
5089 buff[sg_used] = kmalloc(sz, GFP_KERNEL);
5090 if (buff[sg_used] == NULL) {
5091 status = -ENOMEM;
5092 goto cleanup1;
5093 }
5094 if (ioc->Request.Type.Direction & XFER_WRITE) {
5095 if (copy_from_user(buff[sg_used], data_ptr, sz)) {
1/*
2 * Disk Array driver for HP Smart Array SAS controllers
3 * Copyright 2000, 2014 Hewlett-Packard Development Company, L.P.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *

--- 5079 unchanged lines hidden (view full) ---

5088 buff_size[sg_used] = sz;
5089 buff[sg_used] = kmalloc(sz, GFP_KERNEL);
5090 if (buff[sg_used] == NULL) {
5091 status = -ENOMEM;
5092 goto cleanup1;
5093 }
5094 if (ioc->Request.Type.Direction & XFER_WRITE) {
5095 if (copy_from_user(buff[sg_used], data_ptr, sz)) {
5096 status = -ENOMEM;
5096 status = -EFAULT;
5097 goto cleanup1;
5098 }
5099 } else
5100 memset(buff[sg_used], 0, sz);
5101 left -= sz;
5102 data_ptr += sz;
5103 sg_used++;
5104 }

--- 2610 unchanged lines hidden ---
5097 goto cleanup1;
5098 }
5099 } else
5100 memset(buff[sg_used], 0, sz);
5101 left -= sz;
5102 data_ptr += sz;
5103 sg_used++;
5104 }

--- 2610 unchanged lines hidden ---