raw/skeleton: remove useless check
Checks
Commit Message
As reported by Coverity, this check is pointless since dev is already
dereferenced earlier. Besides, dev is passed by the rawdev layer and
can't be NULL.
Note: the issue was probably present before the incriminated commit.
It is unclear why Coverity would start complaining about this now.
Coverity issue: 380991
Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/raw/skeleton/skeleton_rawdev.c | 3 ---
1 file changed, 3 deletions(-)
Comments
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
On Tue, Oct 4, 2022 at 10:00 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> As reported by Coverity, this check is pointless since dev is already
> dereferenced earlier. Besides, dev is passed by the rawdev layer and
> can't be NULL.
>
> Note: the issue was probably present before the incriminated commit.
> It is unclear why Coverity would start complaining about this now.
>
> Coverity issue: 380991
> Fixes: 8f1d23ece06a ("eal: deprecate RTE_FUNC_PTR_* macros")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Applied, thanks.
@@ -475,9 +475,6 @@ static int skeleton_rawdev_firmware_status_get(struct rte_rawdev *dev,
skeldev = skeleton_rawdev_get_priv(dev);
- if (dev == NULL)
- return -EINVAL;
-
if (status_info)
memcpy(status_info, &skeldev->fw.firmware_state,
sizeof(enum skeleton_firmware_state));