Skip to content

Commit

Permalink
video: sh_mobile_meram: Delete an error message for a failed memory a…
Browse files Browse the repository at this point in the history
…llocation in sh_mobile_meram_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: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
elfring authored and bzolnier committed Apr 26, 2018
1 parent 4f7afec commit bdb488e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/video/fbdev/sh_mobile_meram.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,8 @@ static int sh_mobile_meram_probe(struct platform_device *pdev)
}

priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
dev_err(&pdev->dev, "cannot allocate device data\n");
if (!priv)
return -ENOMEM;
}

/* Initialize private data. */
mutex_init(&priv->lock);
Expand Down

0 comments on commit bdb488e

Please sign in to comment.