rtc_read_time(ops, &tm); 
ret = rtc_read_time(ops, &tm); if (ret) break; 
static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,		     unsigned long arg){	struct rtc_ops *ops = file->private_data;	struct rtc_time tm;	struct rtc_wkalrm alrm;	void __user *uarg = (void __user *)arg;	int ret = -EINVAL;	switch (cmd) {	case RTC_ALM_READ:		ret = rtc_read_alarm(ops, &alrm);		if (ret)			break;		ret = copy_to_user(uarg, &alrm.time, sizeof(tm));		if (ret)			ret = -EFAULT;		break;	case RTC_ALM_SET:		ret = copy_from_user(&alrm.time, uarg, sizeof(tm));		if (ret) {			ret = -EFAULT;			break;		}		alrm.enabled = 0;		alrm.pending = 0;		alrm.time.tm_mday = -1;		alrm.time.tm_mon = -1;		alrm.time.tm_year = -1;		alrm.time.tm_wday = -1;		alrm.time.tm_yday = -1;		alrm.time.tm_isdst = -1;		ret = rtc_set_alarm(ops, &alrm);		break;	case RTC_RD_TIME:		rtc_read_time(ops, &tm);		ret = copy_to_user(uarg, &tm, sizeof(tm));		if (ret)			ret = -EFAULT;		break;	case RTC_SET_TIME:		if (!capable(CAP_SYS_TIME)) {			ret = -EACCES;			break;		}		ret = copy_from_user(&tm, uarg, sizeof(tm));		if (ret) {			ret = -EFAULT;			break;		}		ret = rtc_set_time(ops, &tm);		break;	case RTC_EPOCH_SET:#ifndef rtc_epoch		/*		 * There were no RTC clocks before 1900.		 */		if (arg < 1900) {			ret = -EINVAL;			break;		}		if (!capable(CAP_SYS_TIME)) {			ret = -EACCES;			break;		}		rtc_epoch = arg;		ret = 0;#endif		break;	case RTC_EPOCH_READ:		ret = put_user(rtc_epoch, (unsigned long __user *)uarg);		break;	case RTC_WKALM_SET:		ret = copy_from_user(&alrm, uarg, sizeof(alrm));		if (ret) {			ret = -EFAULT;			break;		}		ret = rtc_set_alarm(ops, &alrm);		break;	case RTC_WKALM_RD:		ret = rtc_read_alarm(ops, &alrm);		if (ret)			break;		ret = copy_to_user(uarg, &alrm, sizeof(alrm));		if (ret)			ret = -EFAULT;		break;	default:		if (ops->ioctl)			ret = ops->ioctl(cmd, arg);		break;	}	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d5aa207e46ff7ee838683a7d95ecf46fe42a9a56/rtctime.c/buggy/arch/arm/common/rtctime.c