Skip to content

Commit

Permalink
usb: musb: jz4740: Add missing CR to error strings
Browse files Browse the repository at this point in the history
If you pass a string that is not terminated with a carriage return to
dev_err(), it will eventually be printed with a carriage return, but
not right away, since the kernel will wait for a pr_cont().

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20210123142502.16980-4-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Paul Cercueil authored and Greg Kroah-Hartman committed Feb 5, 2021
1 parent eb44cef commit 23e32a5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions drivers/usb/musb/jz4740.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ static int jz4740_musb_init(struct musb *musb)
if (IS_ERR(musb->xceiv)) {
err = PTR_ERR(musb->xceiv);
if (err != -EPROBE_DEFER)
dev_err(dev, "No transceiver configured: %d", err);
dev_err(dev, "No transceiver configured: %d\n", err);
return err;
}

glue->role_sw = usb_role_switch_register(dev, &role_sw_desc);
if (IS_ERR(glue->role_sw)) {
dev_err(dev, "Failed to register USB role switch");
dev_err(dev, "Failed to register USB role switch\n");
return PTR_ERR(glue->role_sw);
}

Expand Down Expand Up @@ -205,26 +205,26 @@ static int jz4740_probe(struct platform_device *pdev)

pdata = of_device_get_match_data(dev);
if (!pdata) {
dev_err(dev, "missing platform data");
dev_err(dev, "missing platform data\n");
return -EINVAL;
}

musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
if (!musb) {
dev_err(dev, "failed to allocate musb device");
dev_err(dev, "failed to allocate musb device\n");
return -ENOMEM;
}

clk = devm_clk_get(dev, "udc");
if (IS_ERR(clk)) {
dev_err(dev, "failed to get clock");
dev_err(dev, "failed to get clock\n");
ret = PTR_ERR(clk);
goto err_platform_device_put;
}

ret = clk_prepare_enable(clk);
if (ret) {
dev_err(dev, "failed to enable clock");
dev_err(dev, "failed to enable clock\n");
goto err_platform_device_put;
}

Expand All @@ -240,19 +240,19 @@ static int jz4740_probe(struct platform_device *pdev)
ret = platform_device_add_resources(musb, pdev->resource,
pdev->num_resources);
if (ret) {
dev_err(dev, "failed to add resources");
dev_err(dev, "failed to add resources\n");
goto err_clk_disable;
}

ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
if (ret) {
dev_err(dev, "failed to add platform_data");
dev_err(dev, "failed to add platform_data\n");
goto err_clk_disable;
}

ret = platform_device_add(musb);
if (ret) {
dev_err(dev, "failed to register musb device");
dev_err(dev, "failed to register musb device\n");
goto err_clk_disable;
}

Expand Down

0 comments on commit 23e32a5

Please sign in to comment.