aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/carma/carma-fpga-program.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/carma/carma-fpga-program.c')
-rw-r--r--drivers/misc/carma/carma-fpga-program.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c
index fa017cf64bd1..c6bd7e84de24 100644
--- a/drivers/misc/carma/carma-fpga-program.c
+++ b/drivers/misc/carma/carma-fpga-program.c
@@ -830,8 +830,9 @@ static ssize_t penable_store(struct device *dev, struct device_attribute *attr,
830 unsigned long val; 830 unsigned long val;
831 int ret; 831 int ret;
832 832
833 if (strict_strtoul(buf, 0, &val)) 833 ret = kstrtoul(buf, 0, &val);
834 return -EINVAL; 834 if (ret)
835 return ret;
835 836
836 if (val) { 837 if (val) {
837 ret = fpga_enable_power_supplies(priv); 838 ret = fpga_enable_power_supplies(priv);
@@ -859,8 +860,9 @@ static ssize_t program_store(struct device *dev, struct device_attribute *attr,
859 unsigned long val; 860 unsigned long val;
860 int ret; 861 int ret;
861 862
862 if (strict_strtoul(buf, 0, &val)) 863 ret = kstrtoul(buf, 0, &val);
863 return -EINVAL; 864 if (ret)
865 return ret;
864 866
865 /* We can't have an image writer and be programming simultaneously */ 867 /* We can't have an image writer and be programming simultaneously */
866 if (mutex_lock_interruptible(&priv->lock)) 868 if (mutex_lock_interruptible(&priv->lock))