Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp527359pxb; Thu, 12 Aug 2021 23:55:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLTPMhGzYTSqkrq/wdr29/Y9HyptgdWnR/54luvei+9gORafrfA83JGqcDivARBcirAVFY X-Received: by 2002:a02:b190:: with SMTP id t16mr880860jah.85.1628837740479; Thu, 12 Aug 2021 23:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628837740; cv=none; d=google.com; s=arc-20160816; b=pvozARXpGKhG34VvK55sknlgW8B0vc0PV7CJI0pu1Wrje3enJxRXxbJwa4sthD4WEj IjM61MU3NOGTNGi0keapCjwtlHASdLHzYBW74brplMEO6A5H+tam11z6eqw1PZ5KXofn q2IvuzncyZpnyyN6dXJ4sKHAbTDlWIMJMoNX7PKac2Lfb8lLq/cN0pOFWayYDOIyDNl+ aJnb9v83kXtT5yjV+4RwiaUh3fClCux5tou+NIt5ve0MvzvvL8QU7KghS8cL853urnfV /a4CNKzCCiwgBH24atOhwYmtSX1ncLDAVcVRISToln8VqPr/ZzhOtP4owI3eUPvDwb8j DUEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=1gT7mpDG6s/hCpopk7Or2r2BPBrgeyhbfiFWVnIC9cE=; b=0tcDBp6nb3ox2PTfOOzBstAhEQaKljx3wkWplXZd38XKQ8Zi/g77S/2sme5FaeGlX2 G9GfaWXaP7mgIabM1OZHY+F/15vQtARu7hfdNJVnIt/4INUpANZOfnO1xWtVfarEWy6S CAF65u860T515EphJ5YLhPylLYuFv8VxYz8etGBcUOa9D/VHsyklHTE/f/KRLpt/kzvF CSSkZv0k46Mvs0AIRrT8u4NZTw8V3kE8+A3bfv9WwCO5w60GTbaSPkTGW+IrqJIWuoqz B95RIOcsuanVQapdS4P2F3HLl8EewfibMWGJE++00lqv4fMVSJ8dk8xG4sDqfJcKT/6X NajQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si586904ilb.144.2021.08.12.23.55.29; Thu, 12 Aug 2021 23:55:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238868AbhHMGmP (ORCPT + 99 others); Fri, 13 Aug 2021 02:42:15 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:59874 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238622AbhHMGmP (ORCPT ); Fri, 13 Aug 2021 02:42:15 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UirhzQK_1628836883; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UirhzQK_1628836883) by smtp.aliyun-inc.com(127.0.0.1); Fri, 13 Aug 2021 14:41:47 +0800 From: Jiapeng Chong To: mdf@kernel.org Cc: trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] fpga: machxo2-spi: Fix missing error code in machxo2_write_complete() Date: Fri, 13 Aug 2021 14:40:42 +0800 Message-Id: <1628836842-82107-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'ret'. Eliminate the follow smatch warning: drivers/fpga/machxo2-spi.c:341 machxo2_write_complete() warn: missing error code 'ret'. Reported-by: Abaci Robot Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2 support") Signed-off-by: Jiapeng Chong --- drivers/fpga/machxo2-spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c index b4a530a..ea2ec3c 100644 --- a/drivers/fpga/machxo2-spi.c +++ b/drivers/fpga/machxo2-spi.c @@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr, break; if (++refreshloop == MACHXO2_MAX_REFRESH_LOOP) { machxo2_cleanup(mgr); + ret = -EINVAL; goto fail; } } while (1); -- 1.8.3.1