Skip to content

Commit 2ec15a6

Browse files
JuliaLawallgregkh
authored andcommitted
drivers/usb/host/ohci-nxp.c: adjust inconsistent IS_ERR and PTR_ERR
Change the call to PTR_ERR to access the value just tested by IS_ERR. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,e1; @@ ( if (IS_ERR(e)) { ... PTR_ERR(e) ... } | if (IS_ERR(e=e1)) { ... PTR_ERR(e) ... } | *if (IS_ERR(e)) { ... * PTR_ERR(e1) ... } ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 952230d commit 2ec15a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/host/ohci-nxp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
355355
usb_otg_clk = clk_get(&pdev->dev, "ck_usb_otg");
356356
if (IS_ERR(usb_otg_clk)) {
357357
dev_err(&pdev->dev, "failed to acquire USB DEV Clock\n");
358-
ret = PTR_ERR(usb_dev_clk);
358+
ret = PTR_ERR(usb_otg_clk);
359359
goto out6;
360360
}
361361

0 commit comments

Comments
 (0)