diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 18:18:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 18:18:22 -0400 |
commit | 9a69d1aeccf169d9a1e442c07d3a6e87f06a7b49 (patch) | |
tree | 5597011c3595867bf0e073b8f4bdffefe9238a10 /drivers/infiniband/hw/ipath/ipath_fs.c | |
parent | c0341b0f47722fbe5ab45f436fc6ddc1c58c0a6f (diff) | |
parent | 3d27b00457167103fb9f7e23fc2454c801a6b8f0 (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband: (33 commits)
IB/ipath: Fix lockdep error upon "ifconfig ibN down"
IB/ipath: Fix races with ib_resize_cq()
IB/ipath: Support new PCIE device, QLE7142
IB/ipath: Set CPU affinity early
IB/ipath: Fix EEPROM read when driver is compiled with -Os
IB/ipath: Fix and recover TXE piobuf and PBC parity errors
IB/ipath: Change HT CRC message to indicate how to resolve problem
IB/ipath: Clean up module exit code
IB/ipath: Call mtrr_del with correct arguments
IB/ipath: Flush RWQEs if access error or invalid error seen
IB/ipath: Improved support for PowerPC
IB/ipath: Drop unnecessary "(void *)" casts
IB/ipath: Support multiple simultaneous devices of different types
IB/ipath: Fix mismatch in shifts and masks for printing debug info
IB/ipath: Fix compiler warnings and errors on non-x86_64 systems
IB/ipath: Print more informative parity error messages
IB/ipath: Ensure that PD of MR matches PD of QP checking the Rkey
IB/ipath: RC and UC should validate SLID and DLID
IB/ipath: Only allow complete writes to flash
IB/ipath: Count SRQs properly
...
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_fs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_fs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c index c8a8af0fe471..a507d0b5be6c 100644 --- a/drivers/infiniband/hw/ipath/ipath_fs.c +++ b/drivers/infiniband/hw/ipath/ipath_fs.c | |||
@@ -356,19 +356,16 @@ static ssize_t flash_write(struct file *file, const char __user *buf, | |||
356 | 356 | ||
357 | pos = *ppos; | 357 | pos = *ppos; |
358 | 358 | ||
359 | if ( pos < 0) { | 359 | if (pos != 0) { |
360 | ret = -EINVAL; | 360 | ret = -EINVAL; |
361 | goto bail; | 361 | goto bail; |
362 | } | 362 | } |
363 | 363 | ||
364 | if (pos >= sizeof(struct ipath_flash)) { | 364 | if (count != sizeof(struct ipath_flash)) { |
365 | ret = 0; | 365 | ret = -EINVAL; |
366 | goto bail; | 366 | goto bail; |
367 | } | 367 | } |
368 | 368 | ||
369 | if (count > sizeof(struct ipath_flash) - pos) | ||
370 | count = sizeof(struct ipath_flash) - pos; | ||
371 | |||
372 | tmp = kmalloc(count, GFP_KERNEL); | 369 | tmp = kmalloc(count, GFP_KERNEL); |
373 | if (!tmp) { | 370 | if (!tmp) { |
374 | ret = -ENOMEM; | 371 | ret = -ENOMEM; |