From: Heena Sirwani Date: Thu, 25 Sep 2014 09:13:31 +0000 (+0530) Subject: Staging: media: davinci_vpfe: Removed unnecessary out of memory message logging. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31907c0e5c01af537bd4d1f803aa8d9dae74a579;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Staging: media: davinci_vpfe: Removed unnecessary out of memory message logging. The following patch removes the checkpatch.pl warning: WARNING: possible unnecessary out of memory message. Signed-off-by: Heena Sirwani Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index cda8388cbb89..a862b28092e4 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c @@ -228,10 +228,8 @@ static int vpfe_enable_clock(struct vpfe_device *vpfe_dev) vpfe_dev->clks = kzalloc(vpfe_cfg->num_clocks * sizeof(struct clock *), GFP_KERNEL); - if (vpfe_dev->clks == NULL) { - v4l2_err(vpfe_dev->pdev->driver, "Memory allocation failed\n"); + if (vpfe_dev->clks == NULL) return -ENOMEM; - } for (i = 0; i < vpfe_cfg->num_clocks; i++) { if (vpfe_cfg->clocks[i] == NULL) { @@ -349,11 +347,8 @@ static int register_i2c_devices(struct vpfe_device *vpfe_dev) num_subdevs = vpfe_cfg->num_subdevs; vpfe_dev->sd = kzalloc(sizeof(struct v4l2_subdev *)*num_subdevs, GFP_KERNEL); - if (vpfe_dev->sd == NULL) { - v4l2_err(&vpfe_dev->v4l2_dev, - "unable to allocate memory for subdevice\n"); + if (vpfe_dev->sd == NULL) return -ENOMEM; - } for (i = 0, k = 0; i < num_subdevs; i++) { sdinfo = &vpfe_cfg->sub_devs[i]; @@ -582,11 +577,8 @@ static int vpfe_probe(struct platform_device *pdev) int ret = -ENOMEM; vpfe_dev = kzalloc(sizeof(*vpfe_dev), GFP_KERNEL); - if (!vpfe_dev) { - v4l2_err(pdev->dev.driver, - "Failed to allocate memory for vpfe_dev\n"); + if (!vpfe_dev) return ret; - } if (pdev->dev.platform_data == NULL) { v4l2_err(pdev->dev.driver, "Unable to get vpfe config\n");