* [PATCH] usb: dwc3: return error code from the most recent call
@ 2014-11-22 14:56 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2014-11-22 14:56 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: kernel-janitors, Maxime Coquelin, Patrice Chotard, Felipe Balbi,
Greg Kroah-Hartman, linux-arm-kernel, kernel, linux-usb,
linux-omap, linux-kernel
From: Julia Lawall <Julia.Lawall@lip6.fr>
Copy-paste error from the previous block of error handling code.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression e,e1;
@@
if (IS_ERR(e)) {
...
(
ret = PTR_ERR(e);
|
* ret = PTR_ERR(e1);
)
...
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/usb/dwc3/dwc3-st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
index c7602b5..4a1a543 100644
--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -243,7 +243,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
dwc3_data->rstc_rst = devm_reset_control_get(dev, "softreset");
if (IS_ERR(dwc3_data->rstc_rst)) {
dev_err(&pdev->dev, "could not get reset controller\n");
- ret = PTR_ERR(dwc3_data->rstc_pwrdn);
+ ret = PTR_ERR(dwc3_data->rstc_rst);
goto undo_powerdown;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-22 15:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-22 14:56 [PATCH] usb: dwc3: return error code from the most recent call Julia Lawall
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).