[PATCH 1/1]drm/gma500: mdfld: Remove unncessary code

2015-06-24 Thread Patrik Jakobsson
On Wed, Jun 24, 2015 at 10:54 AM, Maninder Singh wrote: > Hi, > >>> - if (!sender || !data_out || !len_out) { >>> - DRM_ERROR("Invalid parameters\n"); >>> - return -EINVAL; >>> - } >>> - >> >>I would prefer to have these kind of checks where it actually matt

[PATCH 1/1]drm/gma500: mdfld: Remove unncessary code

2015-06-24 Thread Maninder Singh
sender is dereferrenced before NULL check struct drm_device *dev = sender->dev; and due to this we get warning during static analysis: warn: variable dereferenced before check 'sender' __read_panel_data Function is called by mdfld_dsi_read_mcs and there is a same check, Thus removing the check fr

[PATCH 1/1]drm/gma500: mdfld: Remove unncessary code

2015-06-24 Thread Patrik Jakobsson
On Wed, Jun 24, 2015 at 9:10 AM, Maninder Singh wrote: > sender is dereferrenced before NULL check > struct drm_device *dev = sender->dev; > > and due to this we get warning during static analysis: > warn: variable dereferenced before check 'sender' > > __read_panel_data Function is called by mdf

[PATCH 1/1]drm/gma500: mdfld: Remove unncessary code

2015-06-24 Thread Maninder Singh
Hi, >> - if (!sender || !data_out || !len_out) { >> - DRM_ERROR("Invalid parameters\n"); >> - return -EINVAL; >> - } >> - > >I would prefer to have these kind of checks where it actually matters >(ie. in __read_panel_data()). The saner thing would be to move