linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* devm_spi_register_master
@ 2013-11-11 17:44 Julia Lawall
  2013-11-12  0:06 ` devm_spi_register_master Jingoo Han
  2013-11-16 10:50 ` devm_spi_register_master Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: Julia Lawall @ 2013-11-11 17:44 UTC (permalink / raw)
  To: broonie-QSEj5FYQhm4dnm+yROfE0A, jg1.han-Sze3O3UU22JBDgjK7y7TUQ,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

Hello,

I was looking into the use of devm_spi_register_master.  This function
seems to take care of registering and unregistering, but not allocation
and freeing.  I have the impression that that is done with
spi_alloc_master and and spi_master_put, which are not managed functions.
But then I wonder how this can work?  It seems that the spi_master_put
function should remain in the probe or remove function, and then the
object could be freed before it is unregistered?

The patch 2fe7e4add3e53df7c1b97e32076f8390dd81c6b3 introduces a call to
devm_spi_register_master and also removes a call to spi_master_put.  By my
reasoning, this would cause a memory leak.

Am I missing something?

thanks,
julia
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-22  2:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11 17:44 devm_spi_register_master Julia Lawall
2013-11-12  0:06 ` devm_spi_register_master Jingoo Han
     [not found]   ` <002701cedf3b$19f5b280$4de11780$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-11-12  3:18     ` devm_spi_register_master Julia Lawall
2013-11-12  6:48       ` devm_spi_register_master Jingoo Han
     [not found]         ` <000301cedf73$2ae7a3e0$80b6eba0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-11-22  2:13           ` devm_spi_register_master Jingoo Han
2013-11-15  8:24       ` devm_spi_register_master Jingoo Han
     [not found]         ` <000e01cee1dc$12a4fba0$37eef2e0$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-11-15  8:49           ` devm_spi_register_master Wei Yongjun
     [not found]             ` <CAPgLHd9hFNuke_cfs9QrQ0E0E_QmRfN3=fESUtBH6PPGgx=Wbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-16 16:05               ` devm_spi_register_master Julia Lawall
2013-11-16 10:50 ` devm_spi_register_master Mark Brown
     [not found]   ` <20131116105029.GN15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-11-16 15:24     ` devm_spi_register_master Julia Lawall
2013-11-16 15:45       ` devm_spi_register_master Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).