lkml.org 
[lkml]   [2017]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/2] [media] ti-vpe: Delete an error message for a failed memory allocation in two functions
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 15 Sep 2017 20:15:17 +0200

Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/platform/ti-vpe/csc.c | 4 +---
drivers/media/platform/ti-vpe/sc.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/csc.c b/drivers/media/platform/ti-vpe/csc.c
index 44b8465cf101..135fc9993679 100644
--- a/drivers/media/platform/ti-vpe/csc.c
+++ b/drivers/media/platform/ti-vpe/csc.c
@@ -176,8 +176,6 @@ struct csc_data *csc_create(struct platform_device *pdev, const char *res_name)
csc = devm_kzalloc(&pdev->dev, sizeof(*csc), GFP_KERNEL);
- if (!csc) {
- dev_err(&pdev->dev, "couldn't alloc csc_data\n");
+ if (!csc)
return ERR_PTR(-ENOMEM);
- }

csc->pdev = pdev;

diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers/media/platform/ti-vpe/sc.c
index e9273b713782..e9e307875feb 100644
--- a/drivers/media/platform/ti-vpe/sc.c
+++ b/drivers/media/platform/ti-vpe/sc.c
@@ -284,8 +284,6 @@ struct sc_data *sc_create(struct platform_device *pdev, const char *res_name)
sc = devm_kzalloc(&pdev->dev, sizeof(*sc), GFP_KERNEL);
- if (!sc) {
- dev_err(&pdev->dev, "couldn't alloc sc_data\n");
+ if (!sc)
return ERR_PTR(-ENOMEM);
- }

sc->pdev = pdev;

--
2.14.1
\
 
 \ /
  Last update: 2017-09-15 20:41    [W:0.035 / U:1.164 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site