mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
staging: rtl8723bs: use direct returns in sdio_dvobj_init()
Make sdio_dvobj_init() use direct returns Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com> Signed-off-by: Omer El Idrissi <omer.e.idriss@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20260326093607.13011-2-omer.e.idrissi@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6671dbbb12
commit
2b0da1fafb
|
|
@ -155,13 +155,12 @@ static void sdio_deinit(struct dvobj_priv *dvobj)
|
|||
}
|
||||
static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
|
||||
{
|
||||
int status = _FAIL;
|
||||
struct dvobj_priv *dvobj = NULL;
|
||||
struct sdio_data *psdio;
|
||||
|
||||
dvobj = devobj_init();
|
||||
if (!dvobj)
|
||||
goto exit;
|
||||
return NULL;
|
||||
|
||||
sdio_set_drvdata(func, dvobj);
|
||||
|
||||
|
|
@ -172,18 +171,14 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)
|
|||
goto free_dvobj;
|
||||
|
||||
rtw_reset_continual_io_error(dvobj);
|
||||
status = _SUCCESS;
|
||||
|
||||
return dvobj;
|
||||
|
||||
free_dvobj:
|
||||
if (status != _SUCCESS && dvobj) {
|
||||
sdio_set_drvdata(func, NULL);
|
||||
sdio_set_drvdata(func, NULL);
|
||||
devobj_deinit(dvobj);
|
||||
|
||||
devobj_deinit(dvobj);
|
||||
|
||||
dvobj = NULL;
|
||||
}
|
||||
exit:
|
||||
return dvobj;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void sdio_dvobj_deinit(struct sdio_func *func)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user