Commit 46afeded authored by Devendra Naga's avatar Devendra Naga Committed by Gustavo Padovan

Bluetooth: cleanup dtl1_config

Improve the error handling of dtl1_config()
Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 38b3fef1
...@@ -586,29 +586,31 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) ...@@ -586,29 +586,31 @@ static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data)
static int dtl1_config(struct pcmcia_device *link) static int dtl1_config(struct pcmcia_device *link)
{ {
dtl1_info_t *info = link->priv; dtl1_info_t *info = link->priv;
int i; int ret;
/* Look for a generic full-sized window */ /* Look for a generic full-sized window */
link->resource[0]->end = 8; link->resource[0]->end = 8;
if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) ret = pcmcia_loop_config(link, dtl1_confcheck, NULL);
if (ret)
goto failed; goto failed;
i = pcmcia_request_irq(link, dtl1_interrupt); ret = pcmcia_request_irq(link, dtl1_interrupt);
if (i != 0) if (ret)
goto failed; goto failed;
i = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (i != 0) if (ret)
goto failed; goto failed;
if (dtl1_open(info) != 0) ret = dtl1_open(info);
if (ret)
goto failed; goto failed;
return 0; return 0;
failed: failed:
dtl1_detach(link); dtl1_detach(link);
return -ENODEV; return ret;
} }
static const struct pcmcia_device_id dtl1_ids[] = { static const struct pcmcia_device_id dtl1_ids[] = {
......
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