Skip to content

Commit

Permalink
HSI: omap_ssi: Delete an error message for a failed memory allocation…
Browse files Browse the repository at this point in the history
… in ssi_add_controller()

The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such a statement here.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
elfring authored and sre committed Jun 8, 2017
1 parent 8621e62 commit 0fbad7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hsi/controllers/omap_ssi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,8 @@ static int ssi_add_controller(struct hsi_controller *ssi,
int err;

omap_ssi = devm_kzalloc(&ssi->device, sizeof(*omap_ssi), GFP_KERNEL);
if (!omap_ssi) {
dev_err(&pd->dev, "not enough memory for omap ssi\n");
if (!omap_ssi)
return -ENOMEM;
}

err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL);
if (err < 0)
Expand Down

0 comments on commit 0fbad7c

Please sign in to comment.