Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp333899pxb; Tue, 28 Sep 2021 23:43:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvMTBf1k6+SGWYptW0Y98xN6S68VtOa+EcpDdQxTDjOVhM45goncCdxW/5Ybt09CQuOXFq X-Received: by 2002:a62:dd94:0:b0:442:bb03:9663 with SMTP id w142-20020a62dd94000000b00442bb039663mr9368479pff.0.1632897810872; Tue, 28 Sep 2021 23:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632897810; cv=none; d=google.com; s=arc-20160816; b=hacxOS+rMc9xJBCNggvrFwx6sl8Y6b7Y0sHmmCOJYKdRN4NArbPgOtLO7n2KDO9BKc vuaGNDOnLrzfbqkjN1u38XmNF1kyQTq0JYhCBbA81STGiqZoRVcqatVAK9qiLAHxzk9u 7tB7lnpwxnXXAMgFhl7+8gsZoFZz3gE/1YTUcNVBsPfceQs+9xH5XqQYLJyYp0/zObB3 kVDnTfhSfWfig462qRYhT5rSy+szNIVNTY1VXGu8/H5y3rSV8EcysgxnHjkNHH/8XZiP J7jUe/w6p13wIy+RckINX2eD/WCrhuceTa85Jq6SJsiuGsS6WyhbYzBzNCs973hdRON5 ZboA== 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=GIrzbGiv35ESfLIYSnODZ3N95+RXrO48w6tIiykwx6k=; b=G99YHmQKZVXpSzEYgDcEj1xn8VbOQeKyOM5spcEKhhTRbSDyoQXYWLhhhAQSvnvkYw fXKVzqivgbGgn0nAlNsDx0JxA/iu7l3SaC3gtuOoPBs/ORxs7sKwAswZjdVkIigvHV0r Kn8f3XiLYjmW+1A3CjQK1+3mYYCHYPZa+sq3ufVEQzCN2pXqQLzdExtbj4W76Nwt0+Fr aYTe01egkq1HFbHbNTB30dYPSptPgZ7+GKQgKO5ew92+77FvhmLBMAQweTl5/ADVZwtR RMTvppOSwbgmj2zMTmgHsQtHuLc7R+azC5grcJfvj1MqKKXTHY4X/6uHiU6RDSXHiNhv gRLA== 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 o15si637353pja.139.2021.09.28.23.43.17; Tue, 28 Sep 2021 23:43:30 -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 S244398AbhI2GmT (ORCPT + 99 others); Wed, 29 Sep 2021 02:42:19 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:35148 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244342AbhI2GmS (ORCPT ); Wed, 29 Sep 2021 02:42:18 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Uq.1tyG_1632897635; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Uq.1tyG_1632897635) by smtp.aliyun-inc.com(127.0.0.1); Wed, 29 Sep 2021 14:40:36 +0800 From: Yang Li To: tim@cyberelk.net Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] pcd: capture error codes on pcd_probe() and pf_probe() Date: Wed, 29 Sep 2021 14:40:29 +0800 Message-Id: <1632897629-84965-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No error code were being captured when pcd_probe() and pf_probe() fail, capture them by assigning them to ret. Clean up smatch warning: drivers/block/paride/pcd.c:939 pcd_init_unit() warn: missing error code 'ret' drivers/block/paride/pf.c:963 pf_init_unit() warn: missing error code 'ret' Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/block/paride/pcd.c | 3 ++- drivers/block/paride/pf.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 4cc0d14..9ae8859 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -935,7 +935,8 @@ static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port, if (!pi_init(cd->pi, autoprobe, port, mode, unit, protocol, delay, pcd_buffer, PI_PCD, verbose, cd->name)) goto out_free_disk; - if (pcd_probe(cd, ms)) + ret = pcd_probe(cd, ms); + if (ret) goto out_pi_release; cd->present = 1; diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 380d80e..7b9acfc 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -959,7 +959,8 @@ static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port, if (!pi_init(pf->pi, autoprobe, port, mode, unit, protocol, delay, pf_scratch, PI_PF, verbose, pf->name)) goto out_free_disk; - if (pf_probe(pf)) + ret = pf_probe(pf); + if (ret) goto out_pi_release; ret = add_disk(disk); -- 1.8.3.1