superio: Never read from port offset zero

At this point, PM1 IOBAD0 is unset, and thus zero...
This commit is contained in:
Richard Hughes 2019-11-08 17:01:23 +00:00
parent 025fc77d7a
commit d630b5ee66

View File

@ -263,18 +263,6 @@ fu_superio_device_setup (FuDevice *device, GError **error)
FuSuperioDeviceClass *klass = FU_SUPERIO_DEVICE_GET_CLASS (device);
FuSuperioDevice *self = FU_SUPERIO_DEVICE (device);
FuSuperioDevicePrivate *priv = GET_PRIVATE (self);
guint8 tmp = 0x0;
/* check port is valid */
if (!fu_udev_device_pread (FU_UDEV_DEVICE (self), priv->pm1_iobad0, &tmp, error))
return FALSE;
if (tmp != 0xff) {
g_set_error_literal (error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_SUPPORTED,
"check port!");
return FALSE;
}
/* check ID is correct */
if (!fu_superio_device_check_id (self, error)) {