Re: [PATCH -next 3/3] devtmpfs: remove return value of devtmpfs_*_node() & devtmpfs_submit_req()

From: Greg KH
Date: Thu Feb 02 2023 - 03:34:43 EST


On Thu, Feb 02, 2023 at 03:32:03AM +0000, Longlong Xia wrote:
> Because the return value of devtmpfs_*_node() and devtmpfs_submit_req()
> are not used by their callers, change them into void functions.

Why not just fix this up properly and have the callers handle the errors
if they happen? Failures at this level should cause the device to not
be registered, as you have found out.

But only do this for devtmpfs_create_node(), there's no reason that
devtmpfs_delete_node() needs to return a value as there's nothing we can
do when cleaning things up on a remove path. So if you split this patch
into half, I'll be glad to take that now while you work on fixing up the
return path of devtmpfs_create_node().

thanks,

greg k-h