[patch] drm/tegra: checking IS_ERR() instead of NULL
Thierry Reding
thierry.reding at gmail.com
Fri Dec 5 05:19:43 PST 2014
On Fri, Dec 05, 2014 at 01:07:27PM +0100, SF Markus Elfring wrote:
> >> diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
> >> index e549afe..fa16048 100644
> >> --- a/drivers/gpu/drm/tegra/drm.c
> >> +++ b/drivers/gpu/drm/tegra/drm.c
> >> @@ -36,8 +36,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
> >>
> >> if (iommu_present(&platform_bus_type)) {
> >> tegra->domain = iommu_domain_alloc(&platform_bus_type);
> >> - if (IS_ERR(tegra->domain)) {
> >> - err = PTR_ERR(tegra->domain);
> >> + if (!tegra->domain) {
> >> + err = -ENOMEM;
> >> goto free;
> >> }
> >
> > Oh, good catch. Applied, thanks.
>
> How do you think about to amend the commit title?
>
> Is the following wording more appropriate?
> drm/tegra: Checking for NULL pointer instead of IS_ERR() usage
Sounds better yes. I've gone with:
drm/tegra: Check for NULL pointer instead of IS_ERR()
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141205/11d5dec4/attachment.sig>
More information about the dri-devel
mailing list