Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37186
b: refs/heads/master
c: 7dae5bf
h: refs/heads/master
v: v3
  • Loading branch information
Bryan O'Sullivan authored and Roland Dreier committed Sep 28, 2006
1 parent 2e46211 commit cebf5e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3e93c7757043cd5d5c4879b8b92effcc7817c81
refs/heads/master: 7dae5bff2e8e4699744e782a6e7605ad18d1240e
9 changes: 3 additions & 6 deletions trunk/drivers/infiniband/hw/ipath/ipath_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,19 +356,16 @@ static ssize_t flash_write(struct file *file, const char __user *buf,

pos = *ppos;

if ( pos < 0) {
if (pos != 0) {
ret = -EINVAL;
goto bail;
}

if (pos >= sizeof(struct ipath_flash)) {
ret = 0;
if (count != sizeof(struct ipath_flash)) {
ret = -EINVAL;
goto bail;
}

if (count > sizeof(struct ipath_flash) - pos)
count = sizeof(struct ipath_flash) - pos;

tmp = kmalloc(count, GFP_KERNEL);
if (!tmp) {
ret = -ENOMEM;
Expand Down

0 comments on commit cebf5e5

Please sign in to comment.