Message ID | 20200819043409.26010-5-nischal.varide@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] Critical-KclockWork-Fixes-intel_atomi.c-PossibleNull | expand |
On 2020-08-19 at 10:04:09 +0530, Nischal Varide wrote: > This Patch fixes the Critical KlockWork Errors and here a Possible Null > Pointer Dereferencing is addressed with a Null Pointer check before > Dereferencing > > Signed-off-by: Nischal Varide <nischal.varide@intel.com> > --- > drivers/gpu/drm/i915/display/intel_crt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c > index 5b4510ce5693..b5777fdc8cac 100644 > --- a/drivers/gpu/drm/i915/display/intel_crt.c > +++ b/drivers/gpu/drm/i915/display/intel_crt.c > @@ -504,6 +504,9 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector) > bool ret; > u32 save_adpa; > > + if (!(dev_priv)) > + return false; > + IMHO this should be treated as false alarm, since i915_driver_probe() has allocated a drm_i915_private i915 priv structure and initilizes drm_dev at early phase, if any erros over there it will be bailed out at early stages. IOW to_i915(drm_dev) will never return null. Thanks, Anshuman Gupta. > /* > * Doing a force trigger causes a hpd interrupt to get sent, which can > * get us stuck in a loop if we're polling: > -- > 2.26.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c index 5b4510ce5693..b5777fdc8cac 100644 --- a/drivers/gpu/drm/i915/display/intel_crt.c +++ b/drivers/gpu/drm/i915/display/intel_crt.c @@ -504,6 +504,9 @@ static bool valleyview_crt_detect_hotplug(struct drm_connector *connector) bool ret; u32 save_adpa; + if (!(dev_priv)) + return false; + /* * Doing a force trigger causes a hpd interrupt to get sent, which can * get us stuck in a loop if we're polling:
This Patch fixes the Critical KlockWork Errors and here a Possible Null Pointer Dereferencing is addressed with a Null Pointer check before Dereferencing Signed-off-by: Nischal Varide <nischal.varide@intel.com> --- drivers/gpu/drm/i915/display/intel_crt.c | 3 +++ 1 file changed, 3 insertions(+)