Re: [PATCH v2] i2c: efm32: Prevent potential division by zero

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

 



Hello Axel,

On Thu, Apr 14, 2016 at 05:49:35PM +0800, Axel Lin wrote:
> Make sure we don't OOPS in case clock-frequency is set to 0 in a DT. The
> variable set here is later used as a divisor.
> 
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
> ---
> If my understand is correct, you prefer to make it return error rather
> than using default frequency setting if DT setting is wrong.

No, I'd say it doesn't matter that the driver crashes if something
invalid is specified in the device tree. This is not a driver bug, but a
dt bug. So if it happens, fix the device tree, no need to modify the
driver.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux