devlink: Return right error code in case of errors for region read
authorParav Pandit <parav@mellanox.com>
Tue, 12 Feb 2019 20:23:58 +0000 (14:23 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 16:45:39 +0000 (11:45 -0500)
commitfdd41ec21e150113e8fe169783db9b2030f5491b
tree2a7e8c079d4511a956debfd7e8b0c9a7b4b08be8
parent415d39427317d1532d7f097471cc8aca5f229b69
devlink: Return right error code in case of errors for region read

devlink_nl_cmd_region_read_dumpit() misses to return right error code on
most error conditions.
Return the right error code on such errors.

Fixes: 4e54795a27f5 ("devlink: Add support for region snapshot read command")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c