nfc: pn533: Delete an unnecessary check

The "rc" variable is set like this:

	if (IS_ERR(resp)) {
		rc = PTR_ERR(resp);

We know that "rc" is negative so there is no need to check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/aJwn2ox5g9WsD2Vx@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
pull/1354/merge
Dan Carpenter 2025-08-13 08:51:22 +03:00 committed by Jakub Kicinski
parent 34167f1a02
commit c6f68f6941
1 changed files with 4 additions and 8 deletions

View File

@ -1412,11 +1412,9 @@ static int pn533_autopoll_complete(struct pn533 *dev, void *arg,
if (dev->poll_mod_count != 0)
return rc;
goto stop_poll;
} else if (rc < 0) {
nfc_err(dev->dev,
"Error %d when running autopoll\n", rc);
goto stop_poll;
}
nfc_err(dev->dev, "Error %d when running autopoll\n", rc);
goto stop_poll;
}
nbtg = resp->data[0];
@ -1505,11 +1503,9 @@ static int pn533_poll_complete(struct pn533 *dev, void *arg,
if (dev->poll_mod_count != 0)
return rc;
goto stop_poll;
} else if (rc < 0) {
nfc_err(dev->dev,
"Error %d when running poll\n", rc);
goto stop_poll;
}
nfc_err(dev->dev, "Error %d when running poll\n", rc);
goto stop_poll;
}
cur_mod = dev->poll_mod_active[dev->poll_mod_curr];