openpromfs property_read() is slightly abused by property_write() - the
latter calls property_read(file, NULL, 0, NULL) if we still hadn't done
any IO on that file; property_read() will do setup work and, since it's
called with count equal to 0, do nothing else.
That stopped working - now we check if *ppos is sane before doing
anything else and that, of course, oopses. Trivial fix is to move the
check past that for count == 0...
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>