Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2fa51107
Commit
2fa51107
authored
Dec 28, 2008
by
Takashi Iwai
Committed by
Takashi Iwai
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: Return proper error code at probe in sound/pcmcia/*
Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
aa3d75d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
13 deletions
+18
-13
sound/pcmcia/pdaudiocf/pdaudiocf.c
sound/pcmcia/pdaudiocf/pdaudiocf.c
+4
-3
sound/pcmcia/vx/vxpocket.c
sound/pcmcia/vx/vxpocket.c
+14
-10
No files found.
sound/pcmcia/pdaudiocf/pdaudiocf.c
View file @
2fa51107
...
@@ -121,13 +121,14 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
...
@@ -121,13 +121,14 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
pdacf
=
snd_pdacf_create
(
card
);
pdacf
=
snd_pdacf_create
(
card
);
if
(
!
pdacf
)
{
if
(
!
pdacf
)
{
snd_card_free
(
card
);
snd_card_free
(
card
);
return
-
E
IO
;
return
-
E
NOMEM
;
}
}
if
(
snd_device_new
(
card
,
SNDRV_DEV_LOWLEVEL
,
pdacf
,
&
ops
)
<
0
)
{
err
=
snd_device_new
(
card
,
SNDRV_DEV_LOWLEVEL
,
pdacf
,
&
ops
);
if
(
err
<
0
)
{
kfree
(
pdacf
);
kfree
(
pdacf
);
snd_card_free
(
card
);
snd_card_free
(
card
);
return
-
ENODEV
;
return
err
;
}
}
snd_card_set_dev
(
card
,
&
handle_to_dev
(
link
));
snd_card_set_dev
(
card
,
&
handle_to_dev
(
link
));
...
...
sound/pcmcia/vx/vxpocket.c
View file @
2fa51107
...
@@ -130,23 +130,26 @@ static struct snd_vx_hardware vxp440_hw = {
...
@@ -130,23 +130,26 @@ static struct snd_vx_hardware vxp440_hw = {
/*
/*
* create vxpocket instance
* create vxpocket instance
*/
*/
static
struct
snd_vxpocket
*
snd_vxpocket_new
(
struct
snd_card
*
card
,
int
ibl
,
static
int
snd_vxpocket_new
(
struct
snd_card
*
card
,
int
ibl
,
struct
pcmcia_device
*
link
)
struct
pcmcia_device
*
link
,
struct
snd_vxpocket
**
chip_ret
)
{
{
struct
vx_core
*
chip
;
struct
vx_core
*
chip
;
struct
snd_vxpocket
*
vxp
;
struct
snd_vxpocket
*
vxp
;
static
struct
snd_device_ops
ops
=
{
static
struct
snd_device_ops
ops
=
{
.
dev_free
=
snd_vxpocket_dev_free
,
.
dev_free
=
snd_vxpocket_dev_free
,
};
};
int
err
;
chip
=
snd_vx_create
(
card
,
&
vxpocket_hw
,
&
snd_vxpocket_ops
,
chip
=
snd_vx_create
(
card
,
&
vxpocket_hw
,
&
snd_vxpocket_ops
,
sizeof
(
struct
snd_vxpocket
)
-
sizeof
(
struct
vx_core
));
sizeof
(
struct
snd_vxpocket
)
-
sizeof
(
struct
vx_core
));
if
(
!
chip
)
if
(
!
chip
)
return
NULL
;
return
-
ENOMEM
;
if
(
snd_device_new
(
card
,
SNDRV_DEV_LOWLEVEL
,
chip
,
&
ops
)
<
0
)
{
err
=
snd_device_new
(
card
,
SNDRV_DEV_LOWLEVEL
,
chip
,
&
ops
);
if
(
err
<
0
)
{
kfree
(
chip
);
kfree
(
chip
);
return
NULL
;
return
err
;
}
}
chip
->
ibl
.
size
=
ibl
;
chip
->
ibl
.
size
=
ibl
;
...
@@ -169,7 +172,8 @@ static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl,
...
@@ -169,7 +172,8 @@ static struct snd_vxpocket *snd_vxpocket_new(struct snd_card *card, int ibl,
link
->
conf
.
ConfigIndex
=
1
;
link
->
conf
.
ConfigIndex
=
1
;
link
->
conf
.
Present
=
PRESENT_OPTION
;
link
->
conf
.
Present
=
PRESENT_OPTION
;
return
vxp
;
*
chip_ret
=
vxp
;
return
0
;
}
}
...
@@ -313,10 +317,10 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
...
@@ -313,10 +317,10 @@ static int vxpocket_probe(struct pcmcia_device *p_dev)
return
err
;
return
err
;
}
}
vxp
=
snd_vxpocket_new
(
card
,
ibl
[
i
],
p_dev
);
err
=
snd_vxpocket_new
(
card
,
ibl
[
i
],
p_dev
,
&
vxp
);
if
(
!
vxp
)
{
if
(
err
<
0
)
{
snd_card_free
(
card
);
snd_card_free
(
card
);
return
-
ENODEV
;
return
err
;
}
}
card
->
private_data
=
vxp
;
card
->
private_data
=
vxp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment