From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [drm-intel:drm-intel-next 14/14] drivers/gpu/drm/i915/display/intel_fb.c:1220:42: warning: Possible null pointer dereference: obj [nullPointer]
Date: Fri, 10 Sep 2021 05:54:58 +0800 [thread overview]
Message-ID: <202109100541.CSwL7FSX-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2986 bytes --]
CC: kbuild-all(a)lists.01.org
CC: intel-gfx(a)lists.freedesktop.org
CC: dri-devel(a)lists.freedesktop.org
TO: Jani Nikula <jani.nikula@intel.com>
CC: Rodrigo Vivi <rodrigo.vivi@intel.com>
tree: git://anongit.freedesktop.org/drm-intel drm-intel-next
head: 705d4feeb269e22c4850ad66e2210b737b553236
commit: 705d4feeb269e22c4850ad66e2210b737b553236 [14/14] drm/i915/fb: move user framebuffer stuff to intel_fb.c
:::::: branch date: 2 weeks ago
:::::: commit date: 2 weeks ago
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/gpu/drm/ttm/ttm_bo.c:556:35: warning: Uninitialized variable: evict_mem [uninitvar]
ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
^
--
>> drivers/gpu/drm/i915/display/intel_fb.c:1220:42: warning: Possible null pointer dereference: obj [nullPointer]
struct drm_i915_private *i915 = to_i915(obj->base.dev);
^
drivers/gpu/drm/i915/display/intel_fb.c:1219:36: note: Assignment 'obj=(fb)?to_intel_bo(fb->obj[0]):NULL', assigned value is 0
struct drm_i915_gem_object *obj = intel_fb_obj(fb);
^
drivers/gpu/drm/i915/display/intel_fb.c:1220:42: note: Null pointer dereference
struct drm_i915_private *i915 = to_i915(obj->base.dev);
^
vim +1220 drivers/gpu/drm/i915/display/intel_fb.c
705d4feeb269e2 Jani Nikula 2021-08-23 1214
705d4feeb269e2 Jani Nikula 2021-08-23 1215 static int intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
705d4feeb269e2 Jani Nikula 2021-08-23 1216 struct drm_file *file,
705d4feeb269e2 Jani Nikula 2021-08-23 1217 unsigned int *handle)
705d4feeb269e2 Jani Nikula 2021-08-23 1218 {
705d4feeb269e2 Jani Nikula 2021-08-23 1219 struct drm_i915_gem_object *obj = intel_fb_obj(fb);
705d4feeb269e2 Jani Nikula 2021-08-23 @1220 struct drm_i915_private *i915 = to_i915(obj->base.dev);
705d4feeb269e2 Jani Nikula 2021-08-23 1221
705d4feeb269e2 Jani Nikula 2021-08-23 1222 if (i915_gem_object_is_userptr(obj)) {
705d4feeb269e2 Jani Nikula 2021-08-23 1223 drm_dbg(&i915->drm,
705d4feeb269e2 Jani Nikula 2021-08-23 1224 "attempting to use a userptr for a framebuffer, denied\n");
705d4feeb269e2 Jani Nikula 2021-08-23 1225 return -EINVAL;
705d4feeb269e2 Jani Nikula 2021-08-23 1226 }
705d4feeb269e2 Jani Nikula 2021-08-23 1227
705d4feeb269e2 Jani Nikula 2021-08-23 1228 return drm_gem_handle_create(file, &obj->base, handle);
705d4feeb269e2 Jani Nikula 2021-08-23 1229 }
705d4feeb269e2 Jani Nikula 2021-08-23 1230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-09-09 21:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202109100541.CSwL7FSX-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.