summaryrefslogtreecommitdiff
path: root/drivers/pci_endpoint/sandbox-pci_ep.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-18 11:31:37 -0400
committerTom Rini <trini@konsulko.com>2019-07-18 11:31:37 -0400
commit0de815356474912ef5bef9a69f0327a5a93bb2c2 (patch)
tree92db8fda09396081f58a0c5fb182e72fbc3fdd50 /drivers/pci_endpoint/sandbox-pci_ep.c
parent9a06eb800c1bdc68aa81fcad6d4f404e12dfff33 (diff)
parentbf88d2b023063a0c46d7617a4f6897d5d561662d (diff)
Merge branch '2019-07-17-master-imports'
- Various FS/disk related fixes with security implications. - Proper fix for the pci_ep test. - Assorted bugfixes - Some MediaTek updates. - 'env erase' support.
Diffstat (limited to 'drivers/pci_endpoint/sandbox-pci_ep.c')
-rw-r--r--drivers/pci_endpoint/sandbox-pci_ep.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci_endpoint/sandbox-pci_ep.c b/drivers/pci_endpoint/sandbox-pci_ep.c
index 0258433d8f..8e05d5ba89 100644
--- a/drivers/pci_endpoint/sandbox-pci_ep.c
+++ b/drivers/pci_endpoint/sandbox-pci_ep.c
@@ -83,14 +83,11 @@ static int sandbox_read_bar(struct udevice *dev, uint fn,
struct pci_bar *ep_bar, enum pci_barno barno)
{
struct sandbox_pci_ep_priv *priv = dev_get_priv(dev);
- int bar_idx;
if (fn > 0)
return -ENODEV;
- bar_idx = ep_bar->barno;
-
- memcpy(ep_bar, &priv->bars[bar_idx], sizeof(*ep_bar));
+ memcpy(ep_bar, &priv->bars[barno], sizeof(*ep_bar));
return 0;
}