This feels like a good place to factor out the code into a utility
function that just does one of them. That should hopefully
reduce the indenting etc enough to make the code easier to read.
+ info->tzds[i].info = info;
+ info->tzds[i].sensor_id = i;
+
+ info->tzds[i].tzd = thermal_zone_of_sensor_register(
+ info->sensor_device,
+ i, &info->tzds[i], &sun4i_ts_tz_ops);
+ /*
+ * Do not fail driver probing when failing to register in
+ * thermal because no thermal DT node is found.
+ */
+ if (IS_ERR(info->tzds[i].tzd) && \
+ PTR_ERR(info->tzds[i].tzd) != -ENODEV) {
+ dev_err(&pdev->dev,
+ "could not register thermal sensor: %ld\n",
+ PTR_ERR(info->tzds[i].tzd));
+ return PTR_ERR(info->tzds[i].tzd);
+ }