[PATCH v2 5/5] Staging: rts5139: More appropriate sizeof operand

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

 



Use the pointer rts51x to get the size of the struct.

Signed-off-by: Fabio Falzoi <fabio.falzoi84@xxxxxxxxx>
---
 drivers/staging/rts5139/rts51x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5139/rts51x.c b/drivers/staging/rts5139/rts51x.c
index a55b97e..b732d2a 100644
--- a/drivers/staging/rts5139/rts51x.c
+++ b/drivers/staging/rts5139/rts51x.c
@@ -723,7 +723,7 @@ static int rts51x_probe(struct usb_interface *intf,
 
 	RTS51X_DEBUGP("%s detected\n", RTS51X_NAME);
 
-	rts51x = kzalloc(sizeof(struct rts51x_usb), GFP_KERNEL);
+	rts51x = kzalloc(sizeof(*rts51x), GFP_KERNEL);
 	if (!rts51x) {
 		pr_warn(RTS51X_TIP
 			"Unable to allocate rts51x_usb\n");
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux