Skip to content

Commit

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

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]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
elfring authored and Lee Jones committed May 16, 2018
1 parent 5112cab commit a5e20bf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/mfd/abx500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ int abx500_register_ops(struct device *dev, struct abx500_ops *ops)
dev_entry = devm_kzalloc(dev,
sizeof(struct abx500_device_entry),
GFP_KERNEL);
if (!dev_entry) {
dev_err(dev, "register_ops kzalloc failed");
if (!dev_entry)
return -ENOMEM;
}

dev_entry->dev = dev;
memcpy(&dev_entry->ops, ops, sizeof(struct abx500_ops));

Expand Down

0 comments on commit a5e20bf

Please sign in to comment.