Skip to content

Commit

Permalink
mfd: twl6030-irq: Delete an error message for a failed memory allocat…
Browse files Browse the repository at this point in the history
…ion in twl6030_init_irq()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
elfring authored and Lee Jones committed May 16, 2018
1 parent 7672c84 commit 9363be2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/twl6030-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,8 @@ int twl6030_init_irq(struct device *dev, int irq_num)
nr_irqs = TWL6030_NR_IRQS;

twl6030_irq = devm_kzalloc(dev, sizeof(*twl6030_irq), GFP_KERNEL);
if (!twl6030_irq) {
dev_err(dev, "twl6030_irq: Memory allocation failed\n");
if (!twl6030_irq)
return -ENOMEM;
}

mask[0] = 0xFF;
mask[1] = 0xFF;
Expand Down

0 comments on commit 9363be2

Please sign in to comment.