public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
To: Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: qi.wang@intel.com, yong.y.wang@intel.com, joel.clark@intel.com,
	kok.howg.ewe@intel.com, Tomoya MORINAGA <tomoya.rohm@gmail.com>
Subject: [PATCH 2/6 v2] usb/gadget/pch_udc: Fix wrong return value
Date: Thu, 12 Jan 2012 11:27:06 +0900	[thread overview]
Message-ID: <1326335230-32469-2-git-send-email-tomoya.rohm@gmail.com> (raw)
In-Reply-To: <1326335230-32469-1-git-send-email-tomoya.rohm@gmail.com>

ISSUE:
If the return value of pch_udc_pcd_init() is False, the return value of this function is unsettled.
Since pch_udc_pcd_init() always returns 0, there is not actually the issue.

CAUSE:
If pch_udc_pcd_init() is True, the variable, retval, is not set for an appropriate value.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
---
V2: Divide into 6 patches
---
 drivers/usb/gadget/pch_udc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index a4f8b08..78a2fce 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -2920,8 +2920,10 @@ static int pch_udc_probe(struct pci_dev *pdev,
 	}
 	pch_udc = dev;
 	/* initialize the hardware */
-	if (pch_udc_pcd_init(dev))
+	if (pch_udc_pcd_init(dev)) {
+		retval = -ENODEV;
 		goto finished;
+	}
 	if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME,
 			dev)) {
 		dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,
-- 
1.7.4.4


  reply	other threads:[~2012-01-12  2:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12  2:27 [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue Tomoya MORINAGA
2012-01-12  2:27 ` Tomoya MORINAGA [this message]
2012-01-12  2:27 ` [PATCH 3/6 v2] usb/gadget/pch_udc: Fix USB suspend issue Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 4/6 v2] usb/gadget/pch_udc: Fix usb/gadget/pch_udc: Fix ether gadget connect/disconnect issue Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 5/6 v2] usb/gadget/pch_udc: Reduce redundant interrupt Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 6/6 v2] usb/gadget/pch_udc: Add debug message Tomoya MORINAGA
2012-01-12 12:12 ` [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue Sergei Shtylyov
2012-01-13  4:12   ` Tomoya MORINAGA
2012-01-24  9:39 ` Felipe Balbi

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=1326335230-32469-2-git-send-email-tomoya.rohm@gmail.com \
    --to=tomoya.rohm@gmail.com \
    --cc=balbi@ti.com \
    --cc=gregkh@suse.de \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=qi.wang@intel.com \
    --cc=yong.y.wang@intel.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