From patchwork Mon Feb 23 05:40:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 442357 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 399E214012C for ; Mon, 23 Feb 2015 16:40:25 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 283231A0C5A for ; Mon, 23 Feb 2015 16:40:25 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7FC2B1A0C04 for ; Mon, 23 Feb 2015 16:40:21 +1100 (AEDT) Received: by pdbfl12 with SMTP id fl12so22900666pdb.4 for ; Sun, 22 Feb 2015 21:40:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=from:to:cc:subject:date:message-id; bh=MlPAvJoMd+cX/i80zjYoRoiwkFtP8mJ8wiTq7661GvI=; b=WRnlHi+V8e5A8+nEbpsb8XPIP1LD6DSWI33tGa8fMtaVMgBFuFo+tSCxMJ8lHozSo3 oYdRYn1jwxShwYOyW1OYfpwFLL4DTMKko98wufqkC/E+q4Sazfpr8wdfMii0MJltOz6t oZHWEm0w8oUHWXNvsxRzQIwFke1/esvxXGZxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MlPAvJoMd+cX/i80zjYoRoiwkFtP8mJ8wiTq7661GvI=; b=R1Rnn5g0FutVBXYLIQXkTPzF2nNeRaWZ8Cg21AYHi0Im+3DS0DAS8B4ai7oEwVV4ds V1tDAv6kO8dbQqN7U0UYhhh3gnjXWQIZheImkW2hMYc3WdS5AK7hPrQTIRTkF9E1Dlmg LVgcD8WcP7LY4E7oRdxPp0x8ZX1USZ2+7M61s+tHtSYGHFjvxpIT/jXb/YEBUjiDk8F/ IuV/mjC3gxWqXS3Y3ulD2eS53nCLd3r9YVlcVwyzV+3Z4mRizmmgtocJKpNfXiwmIJAt eqxb+QRLBDJ5bhFY6PApGMPrMmwwEHaRn6MMKXCS9F9bDyOK9XSmf/8/opxda6oMgdYq t5bA== X-Gm-Message-State: ALoCoQn/n5naY8eeUd7FgeQ8Md4wqaJXKxzOOCf/6MiY4UiLwvC9NaJlaDZ4ud3RauuTbNoKpqgZ X-Received: by 10.66.250.137 with SMTP id zc9mr16098385pac.55.1424670018367; Sun, 22 Feb 2015 21:40:18 -0800 (PST) Received: from icarus.au.ibm.com (220-244-113-206.static.tpgi.com.au. [220.244.113.206]) by mx.google.com with ESMTPSA id ff10sm34558930pad.1.2015.02.22.21.40.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Feb 2015 21:40:17 -0800 (PST) From: Joel Stanley To: skiboot@lists.ozlabs.org Date: Mon, 23 Feb 2015 16:10:08 +1030 Message-Id: <1424670008-9698-1-git-send-email-joel@jms.id.au> X-Mailer: git-send-email 2.1.4 Subject: [Skiboot] [PATCH] core/flash: Don't clobber rc in error path X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" When checking paramters for errors we set rc, but then simply return OPAL_HARDWARE in the error path. Signed-off-by: Joel Stanley --- core/flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/flash.c b/core/flash.c index 6fe9250..16a2762 100644 --- a/core/flash.c +++ b/core/flash.c @@ -301,7 +301,7 @@ static int64_t opal_flash_op(enum flash_op op, uint64_t id, uint64_t offset, err: unlock(&flash_lock); - return OPAL_HARDWARE; + return rc; } static int64_t opal_flash_read(uint64_t id, uint64_t offset, uint64_t buf,