aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/ctresource.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 14:57:57 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-08 14:57:57 +0200
commit514eef9c2a711b4c24b97bb456d39695a6fe1775 (patch)
tree0d98fb13304707682faa56d136249e9177a54932 /sound/pci/ctxfi/ctresource.c
parent4836ac655410e7f126d316b0be062b38746f7529 (diff)
ALSA: ctxfi - Remove useless initializations and cast
Remove useless variable initializations and cast at the beginning of functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctresource.c')
-rw-r--r--sound/pci/ctxfi/ctresource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/ctxfi/ctresource.c b/sound/pci/ctxfi/ctresource.c
index da21a717a07..889c495bb7d 100644
--- a/sound/pci/ctxfi/ctresource.c
+++ b/sound/pci/ctxfi/ctresource.c
@@ -27,7 +27,7 @@ static int
get_resource(u8 *rscs, unsigned int amount,
unsigned int multi, unsigned int *ridx)
{
- int i = 0, j = 0, k = 0, n = 0;
+ int i, j, k, n;
/* Check whether there are sufficient resources to meet request. */
for (i = 0, n = multi; i < amount; i++) {
@@ -61,7 +61,7 @@ get_resource(u8 *rscs, unsigned int amount,
static int put_resource(u8 *rscs, unsigned int multi, unsigned int idx)
{
- unsigned int i = 0, j = 0, k = 0, n = 0;
+ unsigned int i, j, k, n;
/* Mark the contiguous bits in resource bit-map as used */
for (n = multi, i = idx; n > 0; n--) {
@@ -76,7 +76,7 @@ static int put_resource(u8 *rscs, unsigned int multi, unsigned int idx)
int mgr_get_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int *ridx)
{
- int err = 0;
+ int err;
if (n > mgr->avail)
return -ENOENT;