From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Lidza Louina <lidza.louina@gmail.com>,
Mark Hounschell <markh@compro.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 1/4] staging: dgnc: remove unneeded else
Date: Sat, 27 Feb 2016 17:33:32 +0530 [thread overview]
Message-ID: <1456574615-32003-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)
If pci_enable_device() fails then we can return directly.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
I saw there is some pending dgnc patch in outreachy, so this series
might not apply. This series is based on staging-testing.
I will resend v2 if it fails.
drivers/staging/dgnc/dgnc_driver.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index fc6d298..c32f208 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -283,13 +283,13 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* wake up and enable device */
rc = pci_enable_device(pdev);
- if (rc < 0) {
- rc = -EIO;
- } else {
- rc = dgnc_found_board(pdev, ent->driver_data);
- if (rc == 0)
- dgnc_NumBoards++;
- }
+ if (rc)
+ return -EIO;
+
+ rc = dgnc_found_board(pdev, ent->driver_data);
+ if (rc == 0)
+ dgnc_NumBoards++;
+
return rc;
}
--
1.9.1
next reply other threads:[~2016-02-27 12:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 12:03 Sudip Mukherjee [this message]
2016-02-27 12:03 ` [PATCH 2/4] staging: dgnc: remove pci_unregister_driver Sudip Mukherjee
2016-02-27 12:03 ` [PATCH 3/4] staging: dgnc: unregister pci driver Sudip Mukherjee
2016-02-27 12:03 ` [PATCH 4/4] staging: dgnc: cleanup properly Sudip Mukherjee
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=1456574615-32003-1-git-send-email-sudipm.mukherjee@gmail.com \
--to=sudipm.mukherjee@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/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
Powered by JetHome