va_list args;
int error, n;
- if (!S_ISBLK(mode)) {
- printk(KERN_WARNING "%s: invalide mode (%u) for %s\n",
- __FUNCTION__, mode, buf);
- return -EINVAL;
- }
-
va_start(args, fmt);
n = vsnprintf(buf, 64, fmt, args);
if (n >= 64 || !buf[0]) {
__FUNCTION__);
return -EINVAL;
}
+
+ if (!S_ISBLK(mode)) {
+ printk(KERN_WARNING "%s: invalide mode (%u) for %s\n",
+ __FUNCTION__, mode, buf);
+ return -EINVAL;
+ }
de = _devfs_prepare_leaf(&dir, buf, mode);
if (!de) {
va_list args;
int error, n;
- if (!S_ISCHR(mode)) {
- printk(KERN_WARNING "%s: invalide mode (%u) for %s\n",
- __FUNCTION__, mode, buf);
- return -EINVAL;
- }
-
va_start(args, fmt);
n = vsnprintf(buf, 64, fmt, args);
if (n >= 64 || !buf[0]) {
return -EINVAL;
}
+ if (!S_ISCHR(mode)) {
+ printk(KERN_WARNING "%s: invalide mode (%u) for %s\n",
+ __FUNCTION__, mode, buf);
+ return -EINVAL;
+ }
+
de = _devfs_prepare_leaf(&dir, buf, mode);
if (!de) {
printk(KERN_WARNING "%s: could not prepare leaf for %s\n",