On Wed, Jan 18, 2017 at 07:04:52AM -0800, Michael Zoran wrote: > + > + status = vchiq_get_config(instance, args.config_size, &config); > + > + if (status == VCHIQ_SUCCESS) { > + if (copy_to_user((void __user *)args.pconfig, > + &config, > + args.config_size)) { > + ret = -EFAULT; > + break; > + } > + } if vchiq_get_config() fails, we should return a failure. It's sort of a mess, yes, because it can't fail and because it's returning custom error codes. But anyway: if (status != VCHIQ_SUCCESS) return -EINVAL; if (copy_to_user((void __user *)args.pconfig, ... regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel