Dear Christophe, Thank you for reviewing, Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> 於 2025年2月8日 週六 上午4:30寫道: > > Le 07/02/2025 à 08:45, Ming Yu a écrit : > > This driver supports Watchdog timer functionality for NCT6694 MFD > > device based on USB interface. > > ... > > > +static int nct6694_wdt_probe(struct platform_device *pdev) > > +{ > > + const struct mfd_cell *cell = mfd_get_cell(pdev); > > + struct device *dev = &pdev->dev; > > + struct nct6694 *nct6694 = dev_get_drvdata(pdev->dev.parent); > > + struct nct6694_wdt_data *data; > > + struct watchdog_device *wdev; > > + > > + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); > > + if (!data) > > + return -ENOMEM; > > + > > + data->msg = devm_kzalloc(dev, sizeof(union nct6694_wdt_msg), > > + GFP_KERNEL); > > + if (!data->msg) > > + return -ENOMEM; > > + > > + data->dev = dev; > > + data->nct6694 = nct6694; > > + data->wdev_idx = cell->id; > > + > > + wdev = &data->wdev; > > + wdev->info = &nct6694_wdt_info; > > + wdev->ops = &nct6694_wdt_ops; > > + wdev->timeout = timeout; > > + wdev->pretimeout = pretimeout; > > + if (timeout < pretimeout) { > > + dev_warn(data->dev, "pretimeout < timeout. Setting to zero\n"); > > + wdev->pretimeout = 0; > > + } > > + > > + wdev->min_timeout = 1; > > + wdev->max_timeout = 255; > > + > > + devm_mutex_init(dev, &data->lock); > > Error handling? > (also apply for patch 1/7 and 6/7) > I will add error handling for these in the next patch. Best regards, Ming