From: Wei Yongjun <weiyj.lk@gmail.com>
To: Kishon Vijay Abraham I <kishon@ti.com>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-pci@vger.kernel.org
Subject: [PATCH -next] PCI: endpoint: functions: Fix return value check in pci_epf_test_probe()
Date: Fri, 28 Apr 2017 08:55:48 +0000 [thread overview]
Message-ID: <20170428085548.15942-1-weiyj.lk@gmail.com> (raw)
From: Wei Yongjun <weiyongjun1@huawei.com>
Fix the return value check which testing the wrong variable
in pci_epf_test_probe().
Fixes: 79ba640e377b ("PCI: endpoint: functions: Add an EP function
to test PCI")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index d6a7a12..53fff80 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -441,7 +441,7 @@ static int pci_epf_test_probe(struct pci_epf *epf)
struct device *dev = &epf->dev;
epf_test = devm_kzalloc(dev, sizeof(*epf_test), GFP_KERNEL);
- if (!epf)
+ if (!epf_test)
return -ENOMEM;
epf->header = &test_header;
next reply other threads:[~2017-04-28 8:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 8:55 Wei Yongjun [this message]
2017-04-28 15:25 ` [PATCH -next] PCI: endpoint: functions: Fix return value check in pci_epf_test_probe() Bjorn Helgaas
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=20170428085548.15942-1-weiyj.lk@gmail.com \
--to=weiyj.lk@gmail.com \
--cc=bhelgaas@google.com \
--cc=kishon@ti.com \
--cc=linux-pci@vger.kernel.org \
--cc=weiyongjun1@huawei.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).