Commit 11fca34b authored by Markus Elfring's avatar Markus Elfring Committed by Mark Brown

ASoC: blackfin: Use common error handling code in sport_create()

Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 60ea0394
......@@ -394,19 +394,18 @@ struct sport_device *sport_create(struct platform_device *pdev)
sport->pdev = pdev;
ret = sport_get_resource(sport);
if (ret) {
kfree(sport);
return NULL;
}
if (ret)
goto free_data;
ret = sport_request_resource(sport);
if (ret) {
kfree(sport);
return NULL;
}
if (ret)
goto free_data;
dev_dbg(dev, "SPORT create success\n");
return sport;
free_data:
kfree(sport);
return NULL;
}
EXPORT_SYMBOL(sport_create);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment