lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] spi: fix resource leak for drivers without .remove callback
On Thu, Nov 19, 2020 at 04:35:40PM +0100, Uwe Kleine-König wrote:

> Yes, I thought that this is not the final fix. I just sent the minimal
> change to prevent the imbalance. So if I understand correctly, I will
> have to respin with the following squashed into patch 1:

> - if (sdrv->probe || sdrv->remove) {
> - sdrv->driver.probe = spi_drv_probe;
> - sdrv->driver.remove = spi_drv_remove;
> - }
> + sdrv->driver.probe = spi_drv_probe;
> + sdrv->driver.remove = spi_drv_remove;
> if (sdrv->shutdown)
> sdrv->driver.shutdown = spi_drv_shutdown;
> return driver_register(&sdrv->driver);

I think so, I'd need to see the full patch to check of course.

> (Not sure this makes a difference in real life, are there drivers
> without a .probe callback?)

Your changelog seemed to say that it would make remove mandatory.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-11-19 16:43    [W:0.072 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site