sdhci: fix incorrect use of Error *

Detected by Coverity (CID 1386072, 1386073, 1386076, 1386077).  local_err
was unused, and this made the static analyzer unhappy.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20180320151355.25854-1-pbonzini@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Paolo Bonzini 2018-03-23 18:26:45 +00:00 committed by Peter Maydell
parent a75a52d624
commit 544156efcf
1 changed files with 2 additions and 2 deletions

View File

@ -1474,7 +1474,7 @@ static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
Error *local_err = NULL;
sdhci_initfn(s);
sdhci_common_realize(s, errp);
sdhci_common_realize(s, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
@ -1556,7 +1556,7 @@ static void sdhci_sysbus_realize(DeviceState *dev, Error ** errp)
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
Error *local_err = NULL;
sdhci_common_realize(s, errp);
sdhci_common_realize(s, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;