Skip to content

Commit

Permalink
hwmon: (smsc47b397) Fix checkpatch errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Nov 4, 2011
1 parent b2589ab commit 371f2e0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/hwmon/smsc47b397.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct smsc47b397_data {
u8 temp[4];
};

static int smsc47b397_read_value(struct smsc47b397_data* data, u8 reg)
static int smsc47b397_read_value(struct smsc47b397_data *data, u8 reg)
{
int res;

Expand Down Expand Up @@ -265,7 +265,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev)
return -EBUSY;
}

if (!(data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) {
data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL);
if (!data) {
err = -ENOMEM;
goto error_release;
}
Expand All @@ -276,7 +277,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev)
mutex_init(&data->update_lock);
platform_set_drvdata(pdev, data);

if ((err = sysfs_create_group(&dev->kobj, &smsc47b397_group)))
err = sysfs_create_group(&dev->kobj, &smsc47b397_group);
if (err)
goto error_free;

data->hwmon_dev = hwmon_device_register(dev);
Expand Down Expand Up @@ -345,7 +347,7 @@ static int __init smsc47b397_find(unsigned short *addr)
superio_enter();
id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID);

switch(id) {
switch (id) {
case 0x81:
name = "SCH5307-NS";
break;
Expand Down Expand Up @@ -379,7 +381,8 @@ static int __init smsc47b397_init(void)
unsigned short address;
int ret;

if ((ret = smsc47b397_find(&address)))
ret = smsc47b397_find(&address);
if (ret)
return ret;

ret = platform_driver_register(&smsc47b397_driver);
Expand Down

0 comments on commit 371f2e0

Please sign in to comment.