From: Dan Carpenter <dan.carpenter@oracle.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: gregkh@linuxfoundation.org, simon@nikanor.nu, jeremy@azazel.net,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe()
Date: Wed, 6 May 2020 15:53:59 +0300 [thread overview]
Message-ID: <20200506125359.GK1992@kadam> (raw)
In-Reply-To: <20200506125255.90336-1-weiyongjun1@huawei.com>
On Wed, May 06, 2020 at 12:52:55PM +0000, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function. Also
> removed var 'rv' since we can use 'err' instead.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/staging/kpc2000/kpc2000/core.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
> index 7b00d7069e21..14e07742dc9d 100644
> --- a/drivers/staging/kpc2000/kpc2000/core.c
> +++ b/drivers/staging/kpc2000/kpc2000/core.c
> @@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
> {
> int err = 0;
> struct kp2000_device *pcard;
> - int rv;
> unsigned long reg_bar_phys_addr;
> unsigned long reg_bar_phys_len;
> unsigned long dma_bar_phys_addr;
> @@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
> if (err < 0)
> goto err_release_dma;
>
> - rv = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
> + err = request_irq(pcard->pdev->irq, kp2000_irq_handler, IRQF_SHARED,
> pcard->name, pcard);
^
Could you add a space character here so the white space still aligns?
Otherwise it looks good. :)
regards,
dan carpenter
next prev parent reply other threads:[~2020-05-06 12:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 12:52 [PATCH -next] staging: kpc2000: fix error return code in kp2000_pcie_probe() Wei Yongjun
2020-05-06 12:53 ` Dan Carpenter [this message]
2020-05-06 12:57 ` Dan Carpenter
2020-05-06 13:08 ` Wei Yongjun
2020-05-06 13:47 ` [PATCH -next v2] " Wei Yongjun
2020-05-06 14:18 ` Dan Carpenter
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=20200506125359.GK1992@kadam \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jeremy@azazel.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simon@nikanor.nu \
--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