diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-23 05:34:46 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-23 08:58:59 -0400 |
commit | 034f90b393a3d5c99654f048c4b22b3d05e3a345 (patch) | |
tree | b37310e6b9f930617833c2cca409b1165e96f076 | |
parent | e311782acd196d17d25b323d115709c50c8f7d3f (diff) |
ALSA: ak411x: simplify snd_ak4113_create() a bit
"err" is always a negative error code here, so there is no point in
checking. Removing the check silences a static checker warning and
makes the code a bit more clear. Also we don't need to initialize "err".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/i2c/other/ak4113.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c index 88844881cbff..2183e9ebaa6d 100644 --- a/sound/i2c/other/ak4113.c +++ b/sound/i2c/other/ak4113.c | |||
@@ -73,7 +73,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | |||
73 | void *private_data, struct ak4113 **r_ak4113) | 73 | void *private_data, struct ak4113 **r_ak4113) |
74 | { | 74 | { |
75 | struct ak4113 *chip; | 75 | struct ak4113 *chip; |
76 | int err = 0; | 76 | int err; |
77 | unsigned char reg; | 77 | unsigned char reg; |
78 | static struct snd_device_ops ops = { | 78 | static struct snd_device_ops ops = { |
79 | .dev_free = snd_ak4113_dev_free, | 79 | .dev_free = snd_ak4113_dev_free, |
@@ -109,7 +109,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read, | |||
109 | 109 | ||
110 | __fail: | 110 | __fail: |
111 | snd_ak4113_free(chip); | 111 | snd_ak4113_free(chip); |
112 | return err < 0 ? err : -EIO; | 112 | return err; |
113 | } | 113 | } |
114 | EXPORT_SYMBOL_GPL(snd_ak4113_create); | 114 | EXPORT_SYMBOL_GPL(snd_ak4113_create); |
115 | 115 | ||