aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/arm/icside.c
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-01 17:46:44 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-01 17:46:44 -0400
commitcc60d8baa35c995bf8c40a9730b894993ddb43b9 (patch)
tree79bb2801dd644a3450352e6b92b44be771e36d2b /drivers/ide/arm/icside.c
parentab0579685d34eb2c6b101534796ba64c8b9107b5 (diff)
drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
Is this a bug? In original verison memset cleared sizeof(state) bytes instead of sizeof(*state). If it was intentional then this patch is invalid. If not intentional -> valid :) Please review. Bart: Yes, it is a bug so this patch is a valid bugfix. :-) drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/arm/icside.c')
-rw-r--r--drivers/ide/arm/icside.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index c89b5f4b2d04..8a9b98fcb66d 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -693,13 +693,12 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
693 if (ret) 693 if (ret)
694 goto out; 694 goto out;
695 695
696 state = kmalloc(sizeof(struct icside_state), GFP_KERNEL); 696 state = kzalloc(sizeof(struct icside_state), GFP_KERNEL);
697 if (!state) { 697 if (!state) {
698 ret = -ENOMEM; 698 ret = -ENOMEM;
699 goto release; 699 goto release;
700 } 700 }
701 701
702 memset(state, 0, sizeof(state));
703 state->type = ICS_TYPE_NOTYPE; 702 state->type = ICS_TYPE_NOTYPE;
704 state->dev = &ec->dev; 703 state->dev = &ec->dev;
705 704