Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251102
b: refs/heads/master
c: 94cd1ae
h: refs/heads/master
v: v3
  • Loading branch information
Liu Yuan authored and Paul Mundt committed May 24, 2011
1 parent 299c36b commit 0bbf62d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 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: 6dbdf2a1cee23c34a66a35cfa2ae48e62e268dcb
refs/heads/master: 94cd1ae2fd251fd8206c043ce91a99a45439a116
19 changes: 16 additions & 3 deletions trunk/drivers/video/udlfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,10 +1587,19 @@ static int dlfb_usb_probe(struct usb_interface *interface,
goto error;
}

for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
device_create_file(info->dev, &fb_device_attrs[i]);
for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) {
retval = device_create_file(info->dev, &fb_device_attrs[i]);
if (retval) {
pr_err("device_create_file failed %d\n", retval);
goto err_del_attrs;
}
}

device_create_bin_file(info->dev, &edid_attr);
retval = device_create_bin_file(info->dev, &edid_attr);
if (retval) {
pr_err("device_create_bin_file failed %d\n", retval);
goto err_del_attrs;
}

pr_info("DisplayLink USB device /dev/fb%d attached. %dx%d resolution."
" Using %dK framebuffer memory\n", info->node,
Expand All @@ -1599,6 +1608,10 @@ static int dlfb_usb_probe(struct usb_interface *interface,
info->fix.smem_len * 2 : info->fix.smem_len) >> 10);
return 0;

err_del_attrs:
for (i -= 1; i >= 0; i--)
device_remove_file(info->dev, &fb_device_attrs[i]);

error:
if (dev) {

Expand Down

0 comments on commit 0bbf62d

Please sign in to comment.