diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-05-01 15:43:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-01 16:08:38 +0300 |
commit | 3d378dc713f3ff4951d9a50c6a815f011e59da10 (patch) | |
tree | 3331ef1d2ee94ef2b273ab1ec058e63641250483 /Kbuild | |
parent | 391c0325cc5f9e2daf9117825714d777b3595a42 (diff) | |
download | linux-3d378dc713f3ff4951d9a50c6a815f011e59da10.tar.xz |
kobject: fix dereference before null check on kobj
The kobj pointer is being null-checked so potentially it could be null,
however, the ktype declaration before the null check is dereferencing kobj
hence we have a potential null pointer deference. Fix this by moving the
assignment of ktype after kobj has been null checked.
Addresses-Coverity: ("Dereference before null check")
Fixes: aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions