Staging: media: davinci_vpfe: Removed unnecessary out of memory message logging.
authorHeena Sirwani <heenasirwani@gmail.com>
Thu, 25 Sep 2014 09:13:31 +0000 (14:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Sep 2014 03:00:27 +0000 (23:00 -0400)
The following patch removes the checkpatch.pl warning:
WARNING: possible unnecessary out of memory message.

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c

index cda8388cbb89862f126803aa22b328fce884a0f5..a862b28092e401d886352262c3274748f81c0758 100644 (file)
@@ -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");