
Return -ENOMEM instead of -1 to silence the following smatch warning: sound/usb/format.c:170 parse_audio_format_rates_v1() warn: returning -1 instead of -ENOMEM is sloppy
Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- Build tested and based on linux-next 20121115. --- sound/usb/format.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/usb/format.c b/sound/usb/format.c index ddfef57..d033d4d 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -167,7 +167,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof fp->rate_table = kmalloc(sizeof(int) * nr_rates, GFP_KERNEL); if (fp->rate_table == NULL) { snd_printk(KERN_ERR "cannot malloc\n"); - return -1; + return -ENOMEM; }
fp->nr_rates = 0;