]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cmdparser: Use explicit goto for error paths
authorJon Bloomfield <jon.bloomfield@intel.com>
Thu, 27 Sep 2018 17:23:17 +0000 (10:23 -0700)
committerJon Bloomfield <jon.bloomfield@intel.com>
Tue, 5 Nov 2019 19:37:54 +0000 (11:37 -0800)
commit0a3c01f2fcc505cdf97bdf0bc8e125c47caacbc8
tree43bfcd52bc33f7ce95a871075acc4447e8f7e7ad
parent7d002b4b93f8bd0ec3b89b74a40d64855bd244a8
drm/i915/cmdparser: Use explicit goto for error paths

In the next patch we will be adding a second valid
termination condition which will require a small
amount of refactoring to share logic with the BB_END
case.

Refactor all error conditions to jump to a dedicated
exit path, with 'break' reserved only for a successful
parse.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>
Reviewed-by: Chris Wilson <chris.p.wilson@intel.com>
drivers/gpu/drm/i915/i915_cmd_parser.c