[PATCH] aiodev: mc13xxx_adc: zero-initialize struct aiochannel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mc13xxx_adc driver is the only driver that doesn't allocate the
channels from pre-zeroed memory. The aiodev core doesn't currently
require it, but we may want to in the future, so let's explicitly
zero the channel like all other drivers do.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/aiodev/mc13xxx_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/aiodev/mc13xxx_adc.c b/drivers/aiodev/mc13xxx_adc.c
index 21eea1f525af..4d80ee57e3f5 100644
--- a/drivers/aiodev/mc13xxx_adc.c
+++ b/drivers/aiodev/mc13xxx_adc.c
@@ -196,7 +196,7 @@ int mc13xxx_adc_probe(struct device *dev, struct mc13xxx *mc_dev)
 
 	mc13xxx_adc->mc_dev = mc_dev;
 	mc13xxx_adc->aiodev.num_channels = chans;
-	mc13xxx_adc->aiochan = xmalloc(mc13xxx_adc->aiodev.num_channels *
+	mc13xxx_adc->aiochan = xzalloc(mc13xxx_adc->aiodev.num_channels *
 			sizeof(*mc13xxx_adc->aiochan));
 	mc13xxx_adc->aiodev.hwdev = dev;
 	mc13xxx_adc->aiodev.channels =
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux