Commit a105a29b authored by Petr Vandrovec's avatar Petr Vandrovec

Use sizeof(*var) instead of sizeof(struct xxx) in matroxfb.

parent dfa24d84
......@@ -661,7 +661,7 @@ static int matroxfb_get_fix(struct fb_fix_screeninfo *fix, int con,
else
p = ACCESS_FBINFO(fbcon.disp);
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
memset(fix, 0, sizeof(*fix));
strcpy(fix->id,"MATROX");
fix->smem_start = ACCESS_FBINFO(video.base) + ACCESS_FBINFO(curr.ydstorg.bytes);
......
......@@ -957,7 +957,7 @@ static int maven_detect_client(struct i2c_adapter* adapter, int address, unsigne
I2C_FUNC_SMBUS_BYTE_DATA |
I2C_FUNC_PROTOCOL_MANGLING))
goto ERROR0;
if (!(new_client = (struct i2c_client*)kmalloc(sizeof(struct i2c_client) + sizeof(struct maven_data),
if (!(new_client = (struct i2c_client*)kmalloc(sizeof(*new_client) + sizeof(*data),
GFP_KERNEL))) {
err = -ENOMEM;
goto ERROR0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment