Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188178
b: refs/heads/master
c: a4ebb78
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Richard Purdie committed Mar 16, 2010
1 parent 7de62e0 commit 48ec0ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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: c3cf2e44d3bbc694eccef33b0f2fe8e2d89baae7
refs/heads/master: a4ebb780e194e8751dc22deeabcddd3fdc8f18f0
16 changes: 12 additions & 4 deletions trunk/drivers/video/backlight/progear_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static int progearbl_probe(struct platform_device *pdev)
{
u8 temp;
struct backlight_device *progear_backlight_device;
int ret;

pmu_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, NULL);
if (!pmu_dev) {
Expand All @@ -73,8 +74,8 @@ static int progearbl_probe(struct platform_device *pdev)
sb_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
if (!sb_dev) {
printk("ALI 1533 SB not found.\n");
pci_dev_put(pmu_dev);
return -ENODEV;
ret = -ENODEV;
goto put_pmu;
}

/* Set SB_MPS1 to enable brightness control. */
Expand All @@ -84,8 +85,10 @@ static int progearbl_probe(struct platform_device *pdev)
progear_backlight_device = backlight_device_register("progear-bl",
&pdev->dev, NULL,
&progearbl_ops);
if (IS_ERR(progear_backlight_device))
return PTR_ERR(progear_backlight_device);
if (IS_ERR(progear_backlight_device)) {
ret = PTR_ERR(progear_backlight_device);
goto put_sb;
}

platform_set_drvdata(pdev, progear_backlight_device);

Expand All @@ -95,6 +98,11 @@ static int progearbl_probe(struct platform_device *pdev)
progearbl_set_intensity(progear_backlight_device);

return 0;
put_sb:
pci_dev_put(sb_dev);
put_pmu:
pci_dev_put(pmu_dev);
return ret;
}

static int progearbl_remove(struct platform_device *pdev)
Expand Down

0 comments on commit 48ec0ea

Please sign in to comment.