Hello Min Li, The patch 1ddfecafabf7: "ptp: add FemtoClock3 Wireless as ptp hardware clock" from Jan 24, 2024 (linux-next), leads to the following (unpublished) Smatch static checker warning: drivers/ptp/ptp_fc3.c:989 idtfc3_probe() warn: duplicate check 'err' (previous on line 981) drivers/ptp/ptp_fc3.c 947 static int idtfc3_probe(struct platform_device *pdev) 948 { 949 struct rsmu_ddata *ddata = dev_get_drvdata(pdev->dev.parent); 950 struct idtfc3 *idtfc3; 951 int err; 952 953 idtfc3 = devm_kzalloc(&pdev->dev, sizeof(struct idtfc3), GFP_KERNEL); 954 955 if (!idtfc3) 956 return -ENOMEM; 957 958 idtfc3->dev = &pdev->dev; 959 idtfc3->mfd = pdev->dev.parent; 960 idtfc3->lock = &ddata->lock; 961 idtfc3->regmap = ddata->regmap; 962 963 mutex_lock(idtfc3->lock); 964 965 err = idtfc3_check_device_compatibility(idtfc3); 966 if (err) { 967 mutex_unlock(idtfc3->lock); 968 return err; 969 } 970 971 err = idtfc3_load_firmware(idtfc3); 972 if (err) { 973 if (err == -ENOENT) { 974 mutex_unlock(idtfc3->lock); 975 return -EPROBE_DEFER; 976 } 977 dev_warn(idtfc3->dev, "loading firmware failed with %d", err); 978 } 979 980 err = idtfc3_enable_ptp(idtfc3); 981 if (err) { 982 dev_err(idtfc3->dev, "idtfc3_enable_ptp failed with %d", err); 983 mutex_unlock(idtfc3->lock); 984 return err; ^^^^^^^^^^^ 985 } 986 987 mutex_unlock(idtfc3->lock); 988 --> 989 if (err) { "err" is zero at this point. 990 ptp_clock_unregister(idtfc3->ptp_clock); 991 return err; 992 } 993 994 platform_set_drvdata(pdev, idtfc3); 995 996 return 0; 997 } regards, dan carpenter