Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31907c0e authored by Heena Sirwani's avatar Heena Sirwani Committed by Greg Kroah-Hartman
Browse files

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: default avatarHeena Sirwani <heenasirwani@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb67f445
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -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");