Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4826029ybl; Wed, 22 Jan 2020 05:28:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwlcxBHOLj+OkgJYnq66P2erdNaGXScXTCc8yD9T+LG2Z3QfeNKKduCaC+xnyj/4ZjRJ7K0 X-Received: by 2002:aca:50cd:: with SMTP id e196mr6802595oib.178.1579699691822; Wed, 22 Jan 2020 05:28:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699691; cv=none; d=google.com; s=arc-20160816; b=l/YH9yh9JliAAbDF85IvOyB5oTmhoX9qzserZDF+h+wkqXOpkk80RrY0/9kvSwMWKV ZPz3NyD8GKZpq23CSQ+oE6x/PaWYofh0e1k7uB4kjqu+9bTx/lQh8ZWaYRgQvwxtENGf magfVn+EmPa1IgE6nHjJIOBfVQLIys5MPQ8+fSQGVVU5kHdn5wdH6bL370DAilfE3+AQ 9iekusc5T6UYj8WdrsIem/TCtoQKqxhgqmeyV1O+Wx0mjsVYoR8vL2uJXOBU/ZBnelLK k51BCv0J84VN3jJWVbWoo7NNg+DKyKOrZUhesz+5mDDBSK5gVg4TYh4bNmksHoQxhHnz JXTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ulL2BmECVpMh7LElmU5qE+SgUuKvroP3ufFC48Qi00M=; b=Cma5eB5faE1wj8eK8ooTM/CqLPvzAeaWYBlReLoBJekDeZsbtQiFuobeFeU2ywMh2P jHegW+sOOq9E+myUvtcypIAytQgDXtKecgy5fRhhrWiD5NEjtL15x4xzf5C3X+l3JKOy aPusneCVNXTKxT3yirqIUK/IzXq3Hxqi2Nx9arO9X0rgiB8YvOtTW9O2fOA5+BKrCODZ dApSSFXOnnuz1gXf3lXWvqvONeLGcLe7JaNw9h4vRgsgldko6L4F8rbLv8r59t96BOsR 9WozV2Fef60Nv2bk0VdLGsmcCiGNmdOhJByqALEwQbPsGgALnKMk754lcCeQcOXCnK7G EfdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0SXsdQ9; 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 s13si22779765otd.186.2020.01.22.05.27.59; Wed, 22 Jan 2020 05:28:11 -0800 (PST) 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=Y0SXsdQ9; 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 S1729680AbgAVN1I (ORCPT + 99 others); Wed, 22 Jan 2020 08:27:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:48170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728799AbgAVN1B (ORCPT ); Wed, 22 Jan 2020 08:27:01 -0500 Received: from localhost (unknown [84.241.205.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CA5924685; Wed, 22 Jan 2020 13:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699620; bh=EwXiR3OAHCKqfa2wQBGY7nZhL1E2myYAN/IcWN8jdxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y0SXsdQ9vkDMqdTzo0WMl+Tcvb1Hu2XAs5WGxlsQSjY2EqkBIsnE3MPC3Xw0noglw UHRFx+l+0kYnUFZAxd57g70m3fCKRyIiopa1p0L2cBGJwzNG+uxcRH1fGOC45QU4Ls fRvVb6vqMvybEZkcS9SStCDeaLuFNho8kRjogD6k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , "Martin K. Petersen" Subject: [PATCH 5.4 199/222] scsi: esas2r: unlock on error in esas2r_nvram_read_direct() Date: Wed, 22 Jan 2020 10:29:45 +0100 Message-Id: <20200122092847.956034483@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 906ca6353ac09696c1bf0892513c8edffff5e0a6 upstream. This error path is missing an unlock. Fixes: 26780d9e12ed ("[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver") Link: https://lore.kernel.org/r/20191022102324.GA27540@mwanda Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/esas2r/esas2r_flash.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/scsi/esas2r/esas2r_flash.c +++ b/drivers/scsi/esas2r/esas2r_flash.c @@ -1197,6 +1197,7 @@ bool esas2r_nvram_read_direct(struct esa if (!esas2r_read_flash_block(a, a->nvram, FLS_OFFSET_NVR, sizeof(struct esas2r_sas_nvram))) { esas2r_hdebug("NVRAM read failed, using defaults"); + up(&a->nvram_semaphore); return false; }