[patch] staging/atomisp: silence uninitialized variable warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These print an uninitialized value for "opt".  Let's just remove the
printk.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
index 327a5c535fab..7f7c6d5133d2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c
@@ -128,11 +128,9 @@ static ssize_t iunit_dbgfun_store(struct device_driver *drv, const char *buf,
 	unsigned int opt;
 	int ret;
 
-	if (kstrtouint(buf, 10, &opt)) {
-		dev_err(atomisp_dev, "%s setting %d value invalid\n",
-			__func__, opt);
-		return -EINVAL;
-	}
+	ret = kstrtouint(buf, 10, &opt);
+	if (ret)
+		return ret;
 
 	ret = atomisp_set_css_dbgfunc(iunit_debug.isp, opt);
 	if (ret)
@@ -154,11 +152,9 @@ static ssize_t iunit_dbgopt_store(struct device_driver *drv, const char *buf,
 	unsigned int opt;
 	int ret;
 
-	if (kstrtouint(buf, 10, &opt)) {
-		dev_err(atomisp_dev, "%s setting %d value invalid\n",
-			__func__, opt);
-		return -EINVAL;
-	}
+	ret = kstrtouint(buf, 10, &opt);
+	if (ret)
+		return ret;
 
 	iunit_debug.dbgopt = opt;
 	ret = iunit_dump_dbgopt(iunit_debug.isp, iunit_debug.dbgopt);
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux