]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
i2c: axxia: enable clock before calling clk_get_rate()
authorTobias Jordan <Tobias.Jordan@elektrobit.com>
Mon, 30 Apr 2018 14:49:29 +0000 (16:49 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 8 May 2018 21:13:19 +0000 (23:13 +0200)
commite6faa71034f6d0692a3a20d6b55565a36b6b8156
treed61e410156a52fb895a278ef422ca67887e0c284
parentb1437dcb973de79d1f9bca55c6056e8b40ff7ba7
i2c: axxia: enable clock before calling clk_get_rate()

axxia_i2c_init() uses clk_get_rate() for idev->i2c_clk. clk_get_rate()
should only be called if the clock is enabled, so ensure that by moving
the clk_prepare_enable() call before the call to axxia_i2c_init().

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 08678b850cd0 ("i2c: axxia: Add I2C driver for AXM55xx")
Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-axxia.c