Skip to content

Commit

Permalink
serial: sh-sci: Remove useless memory allocation failure printks
Browse files Browse the repository at this point in the history
Printing an error on memory allocation failures is unnecessary.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Greg Kroah-Hartman committed Oct 4, 2015
1 parent d3184e6 commit 4205463
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,11 +1172,8 @@ static int sci_request_irq(struct sci_port *port)
desc = sci_irq_desc + i;
port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
dev_name(up->dev), desc->desc);
if (!port->irqstr[j]) {
dev_err(up->dev, "Failed to allocate %s IRQ string\n",
desc->desc);
if (!port->irqstr[j])
goto out_nomem;
}

ret = request_irq(irq, desc->handler, up->irqflags,
port->irqstr[j], port);
Expand Down Expand Up @@ -2588,10 +2585,8 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
info = match->data;

p = devm_kzalloc(&pdev->dev, sizeof(struct plat_sci_port), GFP_KERNEL);
if (!p) {
dev_err(&pdev->dev, "failed to allocate DT config data\n");
if (!p)
return NULL;
}

/* Get the line number for the aliases node. */
id = of_alias_get_id(np, "serial");
Expand Down

0 comments on commit 4205463

Please sign in to comment.