Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: sm5502: Clean up codes by using checkpatch script

This patch just clean up codes by using checkpatch script and fix warning
message about if statement.

- the result of checkpatch script as following:
WARNING: void function return statements are not generally useful
+ return;
+}

WARNING: quoted string split across lines
+ dev_err(info->dev, "failed: irq request (IRQ: %d,"
+ " error :%d)\n", muic_irq->irq, ret);

- warning message about coding style.

drivers/extcon/extcon-sm5502.c:398 sm5502_muic_cable_handler()
warn: we tested 'attached' before and it was 'false'

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

+4 -5
+4 -5
drivers/extcon/extcon-sm5502.c
··· 391 391 /* Get the type of attached or detached cable */ 392 392 if (attached) 393 393 cable_type = sm5502_muic_get_cable_type(info); 394 - else if (!attached) 394 + else 395 395 cable_type = prev_cable_type; 396 396 prev_cable_type = cable_type; 397 397 ··· 453 453 dev_err(info->dev, "failed to handle MUIC interrupt\n"); 454 454 455 455 mutex_unlock(&info->mutex); 456 - 457 - return; 458 456 } 459 457 460 458 /* ··· 611 613 IRQF_NO_SUSPEND, 612 614 muic_irq->name, info); 613 615 if (ret) { 614 - dev_err(info->dev, "failed: irq request (IRQ: %d," 615 - " error :%d)\n", muic_irq->irq, ret); 616 + dev_err(info->dev, 617 + "failed: irq request (IRQ: %d, error :%d)\n", 618 + muic_irq->irq, ret); 616 619 return ret; 617 620 } 618 621 }