summaryrefslogtreecommitdiff
path: root/net/wol.h
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-06-24 06:41:07 -0400
committerAndes <uboot@andestech.com>2020-07-01 15:01:21 +0800
commit5e8317a9faff472e8b83f5760535e9bf40571a8a (patch)
tree7c7737a0844418e2dd72cd8a7d14ea83664b2171 /net/wol.h
parent78ce0bd3acafc51e94157ff99aec3ed82e685ef5 (diff)
clk: Check that ops of composite clock components exist before calling
clk_composite_ops was shared between all devices in the composite clock driver. If one clock had a feature (such as supporting set_parent) which another clock did not, it could call a null pointer dereference. This patch does three things 1. It adds null-pointer checks to all composite clock functions. 2. It makes clk_composite_ops const and sets its functions at compile-time. 3. It adds some basic sanity checks to num_parents. The combined effect of these changes is that any of mux, rate, or gate can be NULL, and composite clocks will still function normally. Previously, at least mux had to exist, since clk_composite_get_parent was used to determine the parent for clk_register. Signed-off-by: Sean Anderson <seanga2@gmail.com> Acked-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'net/wol.h')
0 files changed, 0 insertions, 0 deletions