Skip to content

Commit 3805e6a

Browse files
Colin Ian Kingtiwai
Colin Ian King
authored andcommitted
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent dfa40d3 commit 3805e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/i2c/other/ak4117.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int snd_ak4117_create(struct snd_card *card, ak4117_read_t *read, ak4117_write_t
110110

111111
__fail:
112112
snd_ak4117_free(chip);
113-
return err < 0 ? err : -EIO;
113+
return err;
114114
}
115115

116116
void snd_ak4117_reg_write(struct ak4117 *chip, unsigned char reg, unsigned char mask, unsigned char val)

0 commit comments

Comments
 (0)