Skip to content

Commit

Permalink
ipack: Delete an error message for a failed memory allocation in ipac…
Browse files Browse the repository at this point in the history
…k_device_read_id()

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <[email protected]>
Acked-by: Samuel Iglesias Gonsálvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
elfring authored and gregkh committed May 18, 2017
1 parent a3ade8c commit df2aa81
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/ipack/ipack.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ static int ipack_device_read_id(struct ipack_device *dev)
* ID ROM contents */
dev->id = kmalloc(dev->id_avail, GFP_KERNEL);
if (!dev->id) {
dev_err(&dev->dev, "dev->id alloc failed.\n");
ret = -ENOMEM;
goto out;
}
Expand Down

0 comments on commit df2aa81

Please sign in to comment.