[RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from clk_get_sys

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

 



Hi,


clk_get_sys() may return ERR_PTR but the drivers immediately
dereferenced the return value. This could lead to oops.

I tried only to fix possible ERR_PTR dereference and to not change
the logic. This is why some of the patches look quite complex.
For example in clk-7xx driver proceeds to next clocks if first one fails.

WARNING:
The patchset was only compile tested (plus static checkers), as
I do not have the hardware. I am kindly asking for tests.


Best regards,
Krzysztof


Krzysztof Kozlowski (8):
  clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
  clk: ti: clk-2xxx: Prevent possible ERR_PTR dereference
  clk: ti: clk-3xxx: Prevent possible ERR_PTR dereference
  clk: ti: clk-33xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-43xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-54xx: Prevent possible ERR_PTR dereference
  clk: ti: clk-7xx: Prevent possible ERR_PTR dereference

 drivers/clk/ti/clk-2xxx.c     | 18 ++++++++++++----
 drivers/clk/ti/clk-33xx.c     |  9 +++++---
 drivers/clk/ti/clk-3xxx.c     | 18 ++++++++++++----
 drivers/clk/ti/clk-43xx.c     |  3 ++-
 drivers/clk/ti/clk-44xx.c     | 16 ++++++++++----
 drivers/clk/ti/clk-54xx.c     | 47 +++++++++++++++++++++++++++-------------
 drivers/clk/ti/clk-7xx.c      | 50 +++++++++++++++++++++++++------------------
 drivers/clk/ti/clk-dra7-atl.c |  5 +++++
 8 files changed, 114 insertions(+), 52 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" 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 (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux