]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ptp: fc3: remove redundant check on variable ret
authorColin Ian King <colin.i.king@gmail.com>
Thu, 31 Oct 2024 13:50:42 +0000 (13:50 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sun, 3 Nov 2024 20:54:42 +0000 (12:54 -0800)
The check on ret has already been performed a few statements earlier
and ret has not been re-assigned and so the re-checking is redundant.
Clean up the code by removing the redundant check.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20241031135042.3250614-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/ptp/ptp_fc3.c

index e14e149b746eb2aa7c596eb3b63b949a55563c77..879b82f03535256ad55f785a61053a9f4be50c8c 100644 (file)
@@ -986,11 +986,6 @@ static int idtfc3_probe(struct platform_device *pdev)
 
        mutex_unlock(idtfc3->lock);
 
-       if (err) {
-               ptp_clock_unregister(idtfc3->ptp_clock);
-               return err;
-       }
-
        platform_set_drvdata(pdev, idtfc3);
 
        return 0;