linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>
To: axboe@kernel.dk
Cc: "F.A.Sulaiman" <asha.16@itfac.mrt.ac.lk>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ATA:libata-pmp: fix warn: missing error code
Date: Thu, 26 Aug 2021 23:13:01 +0530	[thread overview]
Message-ID: <20210826174301.21255-1-asha.16@itfac.mrt.ac.lk> (raw)

smatch reported 'sata_pmp_eh_recover() warn: missing error code 'rc''.
This patch resolve it by adding I/O error code to 'rc'.

Signed-off-by: F.A. SULAIMAN <asha.16@itfac.mrt.ac.lk>
---
 drivers/ata/libata-pmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index ba7be3f38617..2ea7b9986f4e 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -977,6 +977,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap)
 			ata_link_warn(pmp_link,
 				"failed to disable NOTIFY (err_mask=0x%x)\n",
 				err_mask);
+			rc = -EIO;
 			goto pmp_fail;
 		}
 	}
-- 
2.17.1


                 reply	other threads:[~2021-08-26 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210826174301.21255-1-asha.16@itfac.mrt.ac.lk \
    --to=asha.16@itfac.mrt.ac.lk \
    --cc=axboe@kernel.dk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] ATA:libata-pmp: fix warn: missing error code' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).