> > > @@ -938,7 +940,7 @@ long intel_sst_ioctl(struct file *file_ptr, unsigned int > cmd, > > > unsigned long arg) > > > retval = copy_to_user((struct snd_sst_vol *)arg, > > > &get_vol, sizeof(get_vol)); > > > if (retval) { > > > - retval = -EIO; > > > + retval = -EFAULT; > > > break; > > > } > > > /*sst_print_get_vol_info(str_id, &get_vol);*/ > > Since retval is not used and value assigned is supposed to be -EFAULT, > > how about this? > > if(copy_to_user()) > > return -EIO; > > > > No. No. retval is used. We can't return directly because we need to > call unlock_kernel(). Kernel locking is already gone :) [1]. The point here was we don't need to store return value from this function Anyway you could have done it this way if(copy_to_user()) { retval = -EIO; break; } ~Vinod [1]: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-October/032690.html _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel