Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84709
b: refs/heads/master
c: 578c4aa
h: refs/heads/master
i:
  84707: 56c9c1f
v: v3
  • Loading branch information
Ed L. Cashin authored and Linus Torvalds committed Feb 8, 2008
1 parent e3fc8b8 commit 38fd186
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 1d75981a8094e9f84fae65a6a83b361e3893b971
refs/heads/master: 578c4aa0b455a1850208ccc67ca1ca23697e72f5
15 changes: 7 additions & 8 deletions trunk/drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,15 +957,17 @@ addtgt(struct aoedev *d, char *addr, ulong nframes)
for (; tt < te && *tt; tt++)
;

if (tt == te)
if (tt == te) {
printk(KERN_INFO
"aoe: device addtgt failure; too many targets\n");
return NULL;

}
t = kcalloc(1, sizeof *t, GFP_ATOMIC);
if (!t)
return NULL;
f = kcalloc(nframes, sizeof *f, GFP_ATOMIC);
if (!f) {
if (!t || !f) {
kfree(f);
kfree(t);
printk(KERN_INFO "aoe: cannot allocate memory to add target\n");
return NULL;
}

Expand Down Expand Up @@ -1029,9 +1031,6 @@ aoecmd_cfg_rsp(struct sk_buff *skb)
if (!t) {
t = addtgt(d, h->src, n);
if (!t) {
printk(KERN_INFO
"aoe: device addtgt failure; "
"too many targets?\n");
spin_unlock_irqrestore(&d->lock, flags);
return;
}
Expand Down

0 comments on commit 38fd186

Please sign in to comment.