media: video: tegra: nvavp_dev: handle function return value
Deepak Nibade [Wed, 21 Nov 2012 15:31:48 +0000 (20:31 +0530)]
fix coverity issue
Coverity id : 20755

Bug 1046331

Change-Id: Id04298ec908d87b25aae1d025efc0221d03c5337
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/165606
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

drivers/media/video/tegra/nvavp/nvavp_dev.c

index 22ca24b..f73d44b 100644 (file)
@@ -1787,7 +1787,12 @@ static int tegra_nvavp_probe(struct platform_device *ndev)
        nvavp->nvhost_dev = ndev;
        platform_set_drvdata(ndev, nvavp);
 
-       device_create_file(&ndev->dev, &dev_attr_boost_sclk);
+       ret = device_create_file(&ndev->dev, &dev_attr_boost_sclk);
+       if (ret) {
+               dev_err(&ndev->dev,
+                       "%s: device_create_file failed\n", __func__);
+               goto err_req_irq_pend;
+       }
 
        return 0;