mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 15:51:46 +00:00
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: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
60ea0394a6
commit
11fca34b27
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user