Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3732466imm; Mon, 8 Oct 2018 08:39:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV61wRkRMvUhlQJVnMzqGO9lWn5TqmqkUKnTgXz5rTQ3SU8Y8w+0wjy4BEOuC+YsegcwP2COB X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr24870548pla.131.1539013193904; Mon, 08 Oct 2018 08:39:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539013193; cv=none; d=google.com; s=arc-20160816; b=tWPP7uQNt0uojvVCnjj5mqhjScSmwjFXciPSb2UX+qC0mkFStBDuTujzyQRjHgztzi PSbU/07m1iBy3fQJmIu6jBlc2AVCTdH2iJNYxHAPIRIHBTQ6dqPxu2xqRtQjWdU1JUa3 vir4yRtH3pv2U2g61ywgB9rW8tv8J4I0PoJ4oepXXFH+ssdYYRaGKhd7emIUxLwLrIXp bgOusORWv8ZQnH36Zipja06Y8eFqxOq5bjn8Ya1sv4nBQ3bG+3F45g74KgPo6qLn3eAY vnXZvTiVPON/qa/WsS+9tiG4wynGOj9CAe8nZpNSWIqk9i5zCCZ5WnuoV+z8DInXU3EN bLYw== 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:dkim-signature; bh=tocZAnhBfGatv/qUHbMXS0mVSgPHAMoOAPQiX2TkkUA=; b=MOMH8VNsbbtjB0wnLsO7Q4nbyxAG0IvVJtctyGkLcN7TAWBG3hZGzGUzcQzEAbkkPb op4D4GFe/WYIlaHWphzlKixmvDc92465Y885Y/j6X5D9CwG/nJIp4/lh9YzTvt/Zu6lC uC0DPRkemf2Kx2P2s67beow1ECIN+Wiv0wHh+3KXwU/EvDka6NNeAD8pbkgXydeWvnbK sXXna+6fpWgNuUk03gw9Zg21gpp7A6mm4h6FmUbZy1vq9ZIBj6OCzrwVCmTm3uxiR0wA 8o/2ueDBnJFLiJggrnACMM0fI+KqcvrNfePKeRq+V8ainziraCbV6y49BlaZJUTJxmfs yYrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kNlvPPy8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9-v6si17988025pgn.480.2018.10.08.08.39.39; Mon, 08 Oct 2018 08:39:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=kNlvPPy8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726592AbeJHWhp (ORCPT + 99 others); Mon, 8 Oct 2018 18:37:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:55708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726492AbeJHWho (ORCPT ); Mon, 8 Oct 2018 18:37:44 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EBD420841; Mon, 8 Oct 2018 15:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539012330; bh=/C+EsTsB5X9UpQixRXfq6994Rp99OwL0GHAco9gjFTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kNlvPPy8tVwXuFErlNjfblJ5WbZH/+3Dx7a7yKdE/EmFoZPm+jLJBzxEiC8le4TLt tQL36NmAHMZGWzMIM6MzMeDik10JyNy+EAyXAlHx3RUBgr7pFnkcHzthC3avPDnQ6H 7UIqAZniJqQGtF0z1yLjbQYDOBey3++E6JgX6TH0= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shreyas NC , Vinod Koul , Sasha Levin Subject: [PATCH AUTOSEL 4.18 02/58] soundwire: Fix incorrect exit after configuring stream Date: Mon, 8 Oct 2018 11:24:27 -0400 Message-Id: <20181008152523.70705-2-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181008152523.70705-1-sashal@kernel.org> References: <20181008152523.70705-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shreyas NC [ Upstream commit 3fef1a2259c556cce34df2791688cb3001f81c92 ] In sdw_stream_add_master() after the Master ports are configured, the stream is released incorrectly. So, fix it by avoiding stream release after configuring the Master for the stream. While at it, rename the label appropriately. Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/stream.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 7ba6d4d8cd03..b2682272503e 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1112,7 +1112,7 @@ int sdw_stream_add_master(struct sdw_bus *bus, "Master runtime config failed for stream:%s", stream->name); ret = -ENOMEM; - goto error; + goto unlock; } ret = sdw_config_stream(bus->dev, stream, stream_config, false); @@ -1123,9 +1123,11 @@ int sdw_stream_add_master(struct sdw_bus *bus, if (ret) goto stream_error; + goto unlock; + stream_error: sdw_release_master_stream(stream); -error: +unlock: mutex_unlock(&bus->bus_lock); return ret; } -- 2.17.1