Skip to content

Commit

Permalink
OMAP: DSS: Taal: fix error returns in taal_probe()
Browse files Browse the repository at this point in the history
The workqueue creation error branch attempted to destroy a NULL wq,
and, in turn, a failed registration does not destroy the newly created
workqueue.

The problem was reported by a static analysis tool.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
  • Loading branch information
Aaro Koskinen authored and Tomi Valkeinen committed Feb 12, 2010
1 parent 80b1cc2 commit 92fe0ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
if (td->esd_wq == NULL) {
dev_err(&dssdev->dev, "can't create ESD workqueue\n");
r = -ENOMEM;
goto err2;
goto err1;
}
INIT_DELAYED_WORK_DEFERRABLE(&td->esd_work, taal_esd_work);

Expand All @@ -528,7 +528,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
&taal_bl_ops);
if (IS_ERR(bldev)) {
r = PTR_ERR(bldev);
goto err1;
goto err2;
}

td->bldev = bldev;
Expand Down

0 comments on commit 92fe0ff

Please sign in to comment.