diff options
| -rw-r--r-- | drivers/video/udlfb.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 695066b5b2e6..14b152a99d13 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c | |||
| @@ -1587,10 +1587,19 @@ static int dlfb_usb_probe(struct usb_interface *interface, | |||
| 1587 | goto error; | 1587 | goto error; |
| 1588 | } | 1588 | } |
| 1589 | 1589 | ||
| 1590 | for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) | 1590 | for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++) { |
| 1591 | device_create_file(info->dev, &fb_device_attrs[i]); | 1591 | retval = device_create_file(info->dev, &fb_device_attrs[i]); |
| 1592 | if (retval) { | ||
| 1593 | pr_err("device_create_file failed %d\n", retval); | ||
| 1594 | goto err_del_attrs; | ||
| 1595 | } | ||
| 1596 | } | ||
| 1592 | 1597 | ||
| 1593 | device_create_bin_file(info->dev, &edid_attr); | 1598 | retval = device_create_bin_file(info->dev, &edid_attr); |
| 1599 | if (retval) { | ||
| 1600 | pr_err("device_create_bin_file failed %d\n", retval); | ||
| 1601 | goto err_del_attrs; | ||
| 1602 | } | ||
| 1594 | 1603 | ||
| 1595 | pr_info("DisplayLink USB device /dev/fb%d attached. %dx%d resolution." | 1604 | pr_info("DisplayLink USB device /dev/fb%d attached. %dx%d resolution." |
| 1596 | " Using %dK framebuffer memory\n", info->node, | 1605 | " Using %dK framebuffer memory\n", info->node, |
| @@ -1599,6 +1608,10 @@ static int dlfb_usb_probe(struct usb_interface *interface, | |||
| 1599 | info->fix.smem_len * 2 : info->fix.smem_len) >> 10); | 1608 | info->fix.smem_len * 2 : info->fix.smem_len) >> 10); |
| 1600 | return 0; | 1609 | return 0; |
| 1601 | 1610 | ||
| 1611 | err_del_attrs: | ||
| 1612 | for (i -= 1; i >= 0; i--) | ||
| 1613 | device_remove_file(info->dev, &fb_device_attrs[i]); | ||
| 1614 | |||
| 1602 | error: | 1615 | error: |
| 1603 | if (dev) { | 1616 | if (dev) { |
| 1604 | 1617 | ||
