c
struct property *of_find_property(const struct device_node *np,
                                  const char *name,
                                  int *lenp)
{
    if (!np) {
        if (lenp)
            *lenp = -EINVAL;
        return ERR_PTR(-EINVAL);
    }

    struct property *pp;
    unsigned long flags;

    raw_spin_lock_irqsave(&devtree_lock, flags);
    pp = __of_find_property(np, name, lenp);
    // ... rest of the function
}
