lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 09 Dec 2012 23:21:53 +1300
From:	Tony Prisk <linux@...sktech.co.nz>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	linux-fbdev@...r.kernel.org,
	Florian Tobias Schandinat <FlorianSchandinat@....de>,
	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions

On Sun, 2012-12-09 at 08:21 +0100, Julia Lawall wrote:
> > Rather than the goto, add the fail path code in directly, and return.
> >
> >
> > ret = register_framebuffer(&fbi->fb);
> > if (ret < 0) {
> >  dev_err(&pdev->dev,
> >  "Failed to register framebuffer device: %d\n", ret);
> >  if (fbi->fb.cmap.len)
> >    fb_dealloc_cmap(&fbi->fb.cmap);
> >  return ret;
> > }
> 
> So there is no need for the platform_set_drvdata(pdev, NULL); ?

Unless there is some kind of reference counting, I can't see any reason
for this.

> 
> Also, do you know if it is correct that the original code does not include
> a call to dma_free_coherent?

No, that is not correct - there definitely should be a
dma_free_coherent, both in the fail path and in the remove(). Appears
they are both missing.

Regards
Tony P

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ