]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
i2c: bcm2835: Store pointer to bus clock
authorStefan Wahren <wahrenst@gmx.net>
Sat, 4 Jan 2020 15:13:20 +0000 (16:13 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:24:18 +0000 (16:24 +0100)
commit8d5a3a95d8a266279032f4d6818422bc8567cbfd
tree85478c70ec336af056d19e1537a511aa6d1fd215
parent7dd146aa6dd4de030acb3f266fe0c1fe3238394f
i2c: bcm2835: Store pointer to bus clock

BugLink: https://bugs.launchpad.net/bugs/1861085
commit 3b722da6672df8392f9c43d7c7e04bddd81d7e37 upstream.

The commit bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") introduced
a NULL pointer dereference on driver unload. It seems that we can't fetch
the bus clock via devm_clk_get in bcm2835_i2c_remove. As an alternative
approach store a pointer to the bus clock in the private driver structure.

Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/i2c/busses/i2c-bcm2835.c