Skip to content

Commit

Permalink
HSI: ssi_protocol: Delete an error message for a failed memory alloca…
Browse files Browse the repository at this point in the history
…tion in ssi_protocol_probe()

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: Sebastian Reichel <[email protected]>
  • Loading branch information
elfring authored and sre committed Mar 19, 2018
1 parent 80fb8a8 commit 2d8236d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hsi/clients/ssi_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,10 +1088,8 @@ static int ssi_protocol_probe(struct device *dev)
int err;

ssi = kzalloc(sizeof(*ssi), GFP_KERNEL);
if (!ssi) {
dev_err(dev, "No memory for ssi protocol\n");
if (!ssi)
return -ENOMEM;
}

spin_lock_init(&ssi->lock);
timer_setup(&ssi->rx_wd, ssip_rx_wd, TIMER_DEFERRABLE);
Expand Down

0 comments on commit 2d8236d

Please sign in to comment.