{
struct proc_dir_entry *p = proc_mkdir_mode(name, S_IFDIR, parent);
- if (p == NULL)
- ERRDRV("failed to create /proc directory %s", name);
return p;
}
{
struct proc_dir_entry *p = proc_create_data(name, 0, parent,
fops, data);
- if (p == NULL)
- ERRDRV("failed to create /proc file %s", name);
return p;
}
MYPROCTYPE *rc = NULL, *type = NULL;
struct proc_dir_entry *parent = NULL;
- if (procDirRoot == NULL) {
- ERRDRV("procDirRoot cannot be NULL!\n");
+ if (procDirRoot == NULL)
goto Away;
- }
- if (name == NULL || name[0] == NULL) {
- ERRDRV("name must contain at least 1 node name!\n");
+
+ if (name == NULL || name[0] == NULL)
goto Away;
- }
+
type = kzalloc(sizeof(MYPROCTYPE), GFP_KERNEL | __GFP_NORETRY);
if (type == NULL)
goto Away;
+
type->name = name;
type->propertyNames = propertyNames;
type->nProperties = 0;
MYPROCOBJECT *obj = NULL, *rc = NULL;
int i = 0;
- if (type == NULL) {
- ERRDRV("type cannot be NULL\n");
+ if (type == NULL)
goto Away;
- }
+
obj = kzalloc(sizeof(MYPROCOBJECT), GFP_KERNEL | __GFP_NORETRY);
if (obj == NULL)
goto Away;
+
obj->type = type;
obj->context = context;
if (name == NULL) {
{
struct proc_dir_entry_context *ctx = seq->private;
- if (ctx == NULL) {
- ERRDRV("I don't have a freakin' clue...");
+ if (ctx == NULL)
return 0;
- }
(*ctx->show_property)(seq, ctx->procObject->context,
ctx->propertyIndex);
return 0;