Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348654
b: refs/heads/master
c: 242187b
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Dave Airlie committed Jan 13, 2013
1 parent 1aeaff9 commit c480af0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: c930812fe5ebe725760422c9c351d1f6fde1502d
refs/heads/master: 242187b362555849e8c971dfbbfd55f8bd9fa717
8 changes: 7 additions & 1 deletion trunk/drivers/gpu/drm/udl/udl_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
static u8 *udl_get_edid(struct udl_device *udl)
{
u8 *block;
char rbuf[3];
char *rbuf;
int ret, i;

block = kmalloc(EDID_LENGTH, GFP_KERNEL);
if (block == NULL)
return NULL;

rbuf = kmalloc(2, GFP_KERNEL);
if (rbuf == NULL)
goto error;

for (i = 0; i < EDID_LENGTH; i++) {
ret = usb_control_msg(udl->ddev->usbdev,
usb_rcvctrlpipe(udl->ddev->usbdev, 0), (0x02),
Expand All @@ -42,10 +46,12 @@ static u8 *udl_get_edid(struct udl_device *udl)
block[i] = rbuf[1];
}

kfree(rbuf);
return block;

error:
kfree(block);
kfree(rbuf);
return NULL;
}

Expand Down

0 comments on commit c480af0

Please sign in to comment.