From 8232d250a201fe743cfde047bb6b7d8a3a31c90a Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 12 Oct 2017 17:29:07 +0100 Subject: [PATCH] dfu: Do not try to verify the element write if upload is unsupported --- plugins/dfu/dfu-target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/dfu/dfu-target.c b/plugins/dfu/dfu-target.c index f5042dba5..8db70ad62 100644 --- a/plugins/dfu/dfu-target.c +++ b/plugins/dfu/dfu-target.c @@ -1585,7 +1585,8 @@ dfu_target_download_element (DfuTarget *target, } /* verify */ - if (flags & DFU_TARGET_TRANSFER_FLAG_VERIFY) { + if (flags & DFU_TARGET_TRANSFER_FLAG_VERIFY && + dfu_device_has_attribute (priv->device, DFU_DEVICE_ATTRIBUTE_CAN_UPLOAD)) { GBytes *bytes; GBytes *bytes_tmp; g_autoptr(DfuElement) element_tmp = NULL;