Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2727130imm; Tue, 4 Sep 2018 09:03:46 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbgc+XJWKmW8NUYLZlUKSddRMibiLLw98Ay7vyUDSYOUR126KcjZTusGXadPPrW2wJ6ey45 X-Received: by 2002:a63:5143:: with SMTP id r3-v6mr32110294pgl.11.1536077026101; Tue, 04 Sep 2018 09:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536077026; cv=none; d=google.com; s=arc-20160816; b=YYU47RmnMPKL2Fx9WdONDSZTgyhXaClAaUgpcn9PjmGFQ/BxpFMRwxo2AUUYAUt54X iECdofG+9Z0cfJbhz8xJuORquVrBUk+C53CG1BRSGHKFpgBDPgNr/pJvQ8L9TuFg+Z8p txAO5FI55PPsnUKk90arta5TNVRGMuSlTFXwijqTJ9z1YBqXwXPYkiMOdJpkhe9umpgJ axnkITZnCzAfFfIQynoIEk43z+xofOrzUIjSWQT+Gk1HE+UvttA0MCxKodChpYg7Gx6Z TRf9SR2In1MLhf5pTv7SiH3m5xkLTZpfWuBWJxU731fPDY9q0z2Fe+U6scjFoyDydYCu 9TSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=QXPhO41Ucbg89NqncpGg1u4KqvkMpj+TY6e7v5gSq2k=; b=UV1GayTfVfB5syVUndriqVfcntVIIQ09VmYNJpn1DwvEAi9xPhc4pcRFkSAjRQXTQc wLYaJa/oq3jBcqO5Kp+pgFQL6GEdlQoYlBgkwj4npTtLOeJeYpGfGkDyFDxaswPC4nJr MWMmtrL1VXpmgNCWNSwzMurQGH89OlR5APAdQaRVzInmtKxnwfG3U5cLlBLRyqVHwJ/F aTt5Q+f9i9s2IIKH0+Lz9owe+MhXsq9FsrL7LGRDnOqE962F/CloLphwwljPsfVyGXxy 0QqjS0EWXPl7xv4S1bfFbb7Ev/TqbPYvM7OdxEnTEbIn0vNWNwP+nlk/7QYzIMZHQScg /QjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n14-v6si21419464pgg.216.2018.09.04.09.03.20; Tue, 04 Sep 2018 09:03:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728135AbeIDU0S (ORCPT + 99 others); Tue, 4 Sep 2018 16:26:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:51020 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727765AbeIDUYt (ORCPT ); Tue, 4 Sep 2018 16:24:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4B714B0A9; Tue, 4 Sep 2018 15:59:02 +0000 (UTC) From: Takashi Iwai To: Greg Kroah-Hartman Cc: Eric Anholt , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/29] staging: bcm2835-audio: Propagate parameter setup error Date: Tue, 4 Sep 2018 17:58:43 +0200 Message-Id: <20180904155858.8001-15-tiwai@suse.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904155858.8001-1-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the parameter setup fails, the driver should propagate the error code instead of silently ignoring it. Signed-off-by: Takashi Iwai --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c index 13c61af4e723..41bcaff6358b 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c @@ -238,7 +238,7 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) runtime->rate, snd_pcm_format_width(runtime->format)); if (err < 0) - audio_error(" error setting hw params\n"); + goto out; memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect)); @@ -255,8 +255,9 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) alsa_stream->buffer_size, alsa_stream->period_size, alsa_stream->pos, runtime->frame_bits); + out: mutex_unlock(&chip->audio_mutex); - return 0; + return err; } static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream, -- 2.18.0