From: Cyril Roelandt Subject: [PATCH 1/5] radeon: Remove redundant NULL check before radeon_i2c_destroy(). Date: Tue, 12 Feb 2013 05:01:49 +0100 Message-ID: <1360641713-24895-2-git-send-email-tipecaml@gmail.com> References: <1360641713-24895-1-git-send-email-tipecaml@gmail.com> Return-path: In-Reply-To: <1360641713-24895-1-git-send-email-tipecaml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Cyril Roelandt , airlied@linux.ie, alexander.deucher@amd.com, paulmck@linux.vnet.ibm.com, dhowells@redhat.com, mattst88@gmail.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org radeon_i2c_destroy on a NULL pointer is a no-op. Signed-off-by: Cyril Roelandt --- drivers/gpu/drm/radeon/radeon_i2c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index fc60b74..850df44 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -1032,10 +1032,8 @@ void radeon_i2c_fini(struct radeon_device *rdev) int i; for (i = 0; i < RADEON_MAX_I2C_BUS; i++) { - if (rdev->i2c_bus[i]) { - radeon_i2c_destroy(rdev->i2c_bus[i]); - rdev->i2c_bus[i] = NULL; - } + radeon_i2c_destroy(rdev->i2c_bus[i]); + rdev->i2c_bus[i] = NULL; } } -- 1.7.10.4