net: microchip: vcap api: Use ERR_CAST() in vcap_decode_rule()
authorLi Zetao <lizetao1@huawei.com>
Wed, 2 Aug 2023 09:31:56 +0000 (17:31 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2023 08:00:23 +0000 (09:00 +0100)
commit58e701264f15a8984136f4997faf99cb22b121f3
tree8c65c7a8a4a8980a6147fa26e5ecae61a7b689b4
parentf702dbbb9fc25de45d9d0fc2572f62b4b22cef16
net: microchip: vcap api: Use ERR_CAST() in vcap_decode_rule()

There is a warning reported by coccinelle:

./drivers/net/ethernet/microchip/vcap/vcap_api.c:2399:9-16: WARNING:
ERR_CAST can be used with ri

Use ERR_CAST instead of ERR_PTR + PTR_ERR to simplify the
conversion process.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/vcap/vcap_api.c