On Thu, May 14, 2015 at 10:58:44AM +0000, Drokin, Oleg wrote: > So I imagine the only case where this could fail is if we got a pointer to some read-only location > (or there's somebody playing with mappings behind our back?) so it should be totally fine to > do it the other way around: > > rc = -EOVERFLOW; > if (copy_to_user(lump, &lum, lum_size)) > rc = -EFAULT; > > goto out_set; > Let's just leave it as-is. The original code is fine. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel