summaryrefslogtreecommitdiffstats
path: root/sound/i2c/other
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-07-12 11:22:40 +0100
committerTakashi Iwai <tiwai@suse.de>2016-07-12 12:26:09 +0200
commit3805e6a18d459d520fb921698e3e3e21d8a039db (patch)
tree6b4f636820ffcc110fa15c3d3667b7b465f1f6c1 /sound/i2c/other
parentdfa40d3e3686591f7c30990c67f11b5d30f4527f (diff)
downloadlinux-3805e6a18d459d520fb921698e3e3e21d8a039db.tar.gz
linux-3805e6a18d459d520fb921698e3e3e21d8a039db.tar.bz2
linux-3805e6a18d459d520fb921698e3e3e21d8a039db.zip
ALSA: ak4117: remove redundant check on err being < 0
snd_ak4117_create checks if the error return err is less than zero or not. This is a redundant check, err can only be < 0 to get to the __fail label, in which case just return err and remove the redundant check (since we never return -EIO). Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/i2c/other')
-rw-r--r--sound/i2c/other/ak4117.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/i2c/other/ak4117.c b/sound/i2c/other/ak4117.c
index 48848909a5a9..0702f0552d19 100644
--- a/sound/i2c/other/ak4117.c
+++ b/sound/i2c/other/ak4117.c
@@ -110,7 +110,7 @@ int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t
__fail:
snd_ak4117_free(chip);
- return err < 0 ? err : -EIO;
+ return err;
}
void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val)