From patchwork Mon Oct 7 19:39:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Reece R. Pollack" X-Patchwork-Id: 20877 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC2E224697 for ; Mon, 7 Oct 2013 19:40:40 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf14654720qcy.1 for ; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=UmY8yw8YntUJhvN3MRtfyUCKcz5il4ZnCQtAlYXBI08=; b=AFcQZ6Wp3O5v0HCmpLCVLUIBPqGHgwNQxQOk3ExHAv+5I9BlCJ8o9Rt7eCcE/JXW5z wpi8sNS0a/7BO36PQRSGzpG1NIEpEDQe+xFsp5PEYrJLZ160EPh4iz9O21mn3pF5/EQo gykKaw2WtBlm7z8cq+JrkmZUakrMIrE+esxaJ4yoioJCR6VGv+fzwHHTG5CuXEVsxNMY QwNGRiS3DUFtm5KIolZc5NpRmhKEaCpTJrdSFw4zkuh2nJAQDq+U+LytNokWWux309TF HyMuatG46kPWvk0QYL+sOZiqTq13jJTuFc182K9UrpcV1JgxjZHwyv0HeXW7sG7eHjUn fnFw== X-Received: by 10.236.116.135 with SMTP id g7mr12683858yhh.53.1381174840779; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.12.103 with SMTP id x7ls1389747qeb.14.gmail; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) X-Received: by 10.52.34.109 with SMTP id y13mr23911307vdi.8.1381174840644; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id st7si8156048vdc.68.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 12:40:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id w16so3596046vbf.21 for ; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) X-Gm-Message-State: ALoCoQn8f/P2MH7qm1IQMIzjq8gdtEQao8iK6DM3ImnLBtYSkzrV6iXPai8aSUg/mW5aUdzXGRdX X-Received: by 10.52.164.102 with SMTP id yp6mr24218048vdb.14.1381174840483; Mon, 07 Oct 2013 12:40:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp149570vcz; Mon, 7 Oct 2013 12:40:40 -0700 (PDT) X-Received: by 10.60.40.67 with SMTP id v3mr48858204oek.16.1381174833780; Mon, 07 Oct 2013 12:40:33 -0700 (PDT) Received: from comal.ext.ti.com (comal.ext.ti.com. [198.47.26.152]) by mx.google.com with ESMTPS id c5si22527043oed.89.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 07 Oct 2013 12:40:33 -0700 (PDT) Received-SPF: neutral (google.com: 198.47.26.152 is neither permitted nor denied by best guess record for domain of x0183204@udx0183204) client-ip=198.47.26.152; Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r97JeVQ1029267; Mon, 7 Oct 2013 14:40:31 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r97JeVKh016834; Mon, 7 Oct 2013 14:40:31 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Mon, 7 Oct 2013 14:40:30 -0500 Received: from udx0183204 (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id r97JeUtW012425; Mon, 7 Oct 2013 14:40:30 -0500 Received: from x0183204 by udx0183204 with local (Exim 4.80) (envelope-from ) id 1VTGfO-0004Ua-66; Mon, 07 Oct 2013 15:40:30 -0400 From: "Reece R. Pollack" To: CC: Olivier Martin , Subject: [PATCH 01/10] MdeModulePkg/MnpDxe: Checked returned value of Snp->GetStatus() Date: Mon, 7 Oct 2013 15:39:52 -0400 Message-ID: <1381174801-17221-2-git-send-email-reece.pollack@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1381174801-17221-1-git-send-email-reece.pollack@linaro.org> References: <1381174801-17221-1-git-send-email-reece.pollack@linaro.org> MIME-Version: 1.0 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: reece.pollack@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Olivier Martin ... as explicitly said by the comment. Signed-off-by: Olivier Martin Change-Id: Id9fd51dd5510d6acd04fe2c323a901248c4b85c3 --- MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c index 4c0f3dd..9cdbb43 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c @@ -79,8 +79,10 @@ MnpGetModeData ( // Upon successful return of GetStatus(), the Snp->Mode->MediaPresent // will be updated to reflect any change of media status // - Snp->GetStatus (Snp, &InterruptStatus, NULL); - CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData)); + Status = Snp->GetStatus (Snp, &InterruptStatus, NULL); + if (!EFI_ERROR (Status)) { + CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData)); + } } if (!Instance->Configured) {