Re: [PATCH 3/3] MIPS: jz4740: Move reset code to the watchdog driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 10 January 2015 17:18:03 Guenter Roeck wrote:
> On 01/10/2015 10:29 AM, Lars-Peter Clausen wrote:
> > @@ -186,9 +208,20 @@ static int jz4740_wdt_probe(struct platform_device
> > *pdev)> 
> >   	if (ret < 0)
> >   		goto err_disable_clk;
> > 
> > +	drvdata->restart_handler.notifier_call = jz4740_wdt_restart;
> > +	drvdata->restart_handler.priority = 128;
> > +	ret = register_restart_handler(&drvdata->restart_handler);
> > +	if (ret) {
> > +		dev_err(&pdev->dev, "cannot register restart handler, %d\n",
> > +			ret);
> > +		goto err_unregister_watchdog;
> 
> Are you sure you want to abort in this case ?
> After all, the watchdog would still work.

That raises a similar question: what about the opposite case, where the 
watchdog registration fails? If the resource acquisition part of the probe 
fails, neither the watchdog nor the restart functionality is going to work, 
but if the call to watchdog_register_device() fails, the restart handler 
would still work.

Bye,
		Maarten

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux