Re: [PATCH] fs: uselib - Set error on do_filp_open failure only

From: Al Viro
Date: Sat Apr 21 2012 - 18:09:50 EST

On Sun, Apr 22, 2012 at 03:19:43AM +0530, Sasikanth V wrote:
> At present "error" is set irrespective of do_filp_open failed or not.
> Setting error to PTR_ERR(file) on do_filp_open failure only.

NAK, since it's completely pointless. PTR_ERR() is safe to use on *any*
pointers; result won't be anything interesting unless IS_ERR() is true,
but PTR_ERR() itself can be evaluated just fine.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at