]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
gma500: clean up error handling in init
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 3 Dec 2020 08:40:48 +0000 (11:40 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Apr 2021 16:31:25 +0000 (18:31 +0200)
commit0d531bca220723d20c0d0e220ae80c574b64b6b9
tree865b0ced9b5bb17a97cae42aaac425edaec5c184
parent18890b1fb1a43df78082195743ecd8bd4691fd35
gma500: clean up error handling in init

BugLink: https://bugs.launchpad.net/bugs/1918974
[ Upstream commit 15ccc39b3aab667c6fa131206f01f31bfbccdf6a ]

The main problem with this error handling was that it didn't clean up if
i2c_add_numbered_adapter() failed.  This code is pretty old, and doesn't
match with today's checkpatch.pl standards so I took the opportunity to
tidy it up a bit.  I changed the NULL comparison, and removed the
WARNING message if kzalloc() fails and updated the label names.

Fixes: 1b082ccf5901 ("gma500: Add Oaktrail support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/X8ikkAqZfnDO2lu6@mwanda
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c