Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dan Carpenter and committed by
Jakub Kicinski
c6f68f69 34167f1a

+4 -8
+4 -8
drivers/nfc/pn533/pn533.c
··· 1412 1412 if (dev->poll_mod_count != 0) 1413 1413 return rc; 1414 1414 goto stop_poll; 1415 - } else if (rc < 0) { 1416 - nfc_err(dev->dev, 1417 - "Error %d when running autopoll\n", rc); 1418 - goto stop_poll; 1419 1415 } 1416 + nfc_err(dev->dev, "Error %d when running autopoll\n", rc); 1417 + goto stop_poll; 1420 1418 } 1421 1419 1422 1420 nbtg = resp->data[0]; ··· 1503 1505 if (dev->poll_mod_count != 0) 1504 1506 return rc; 1505 1507 goto stop_poll; 1506 - } else if (rc < 0) { 1507 - nfc_err(dev->dev, 1508 - "Error %d when running poll\n", rc); 1509 - goto stop_poll; 1510 1508 } 1509 + nfc_err(dev->dev, "Error %d when running poll\n", rc); 1510 + goto stop_poll; 1511 1511 } 1512 1512 1513 1513 cur_mod = dev->poll_mod_active[dev->poll_mod_curr];