Commit 371f2e08 authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

hwmon: (smsc47b397) Fix checkpatch errors

Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent b2589ab0
...@@ -113,7 +113,7 @@ struct smsc47b397_data { ...@@ -113,7 +113,7 @@ struct smsc47b397_data {
u8 temp[4]; 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; int res;
...@@ -265,7 +265,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev) ...@@ -265,7 +265,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev)
return -EBUSY; return -EBUSY;
} }
if (!(data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) { data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL);
if (!data) {
err = -ENOMEM; err = -ENOMEM;
goto error_release; goto error_release;
} }
...@@ -276,7 +277,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev) ...@@ -276,7 +277,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev)
mutex_init(&data->update_lock); mutex_init(&data->update_lock);
platform_set_drvdata(pdev, data); 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; goto error_free;
data->hwmon_dev = hwmon_device_register(dev); data->hwmon_dev = hwmon_device_register(dev);
...@@ -345,7 +347,7 @@ static int __init smsc47b397_find(unsigned short *addr) ...@@ -345,7 +347,7 @@ static int __init smsc47b397_find(unsigned short *addr)
superio_enter(); superio_enter();
id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID); id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID);
switch(id) { switch (id) {
case 0x81: case 0x81:
name = "SCH5307-NS"; name = "SCH5307-NS";
break; break;
...@@ -379,7 +381,8 @@ static int __init smsc47b397_init(void) ...@@ -379,7 +381,8 @@ static int __init smsc47b397_init(void)
unsigned short address; unsigned short address;
int ret; int ret;
if ((ret = smsc47b397_find(&address))) ret = smsc47b397_find(&address);
if (ret)
return ret; return ret;
ret = platform_driver_register(&smsc47b397_driver); ret = platform_driver_register(&smsc47b397_driver);
......
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