diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-11-04 07:00:47 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-11-04 07:00:47 -0400 |
commit | 371f2e083b9b081adf68d04fba4978a27dc4e618 (patch) | |
tree | bcbe57ef4bdaa2f6589a5c98804e6c5cbfb9151b /drivers/hwmon | |
parent | b2589ab02b46ea4a80b30a90fc2fe8eed957e86a (diff) |
hwmon: (smsc47b397) Fix checkpatch errors
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/smsc47b397.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c index 9fb7516e6f45..65c88ff5645a 100644 --- a/drivers/hwmon/smsc47b397.c +++ b/drivers/hwmon/smsc47b397.c | |||
@@ -113,7 +113,7 @@ struct smsc47b397_data { | |||
113 | u8 temp[4]; | 113 | u8 temp[4]; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static int smsc47b397_read_value(struct smsc47b397_data* data, u8 reg) | 116 | static int smsc47b397_read_value(struct smsc47b397_data *data, u8 reg) |
117 | { | 117 | { |
118 | int res; | 118 | int res; |
119 | 119 | ||
@@ -265,7 +265,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev) | |||
265 | return -EBUSY; | 265 | return -EBUSY; |
266 | } | 266 | } |
267 | 267 | ||
268 | if (!(data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL))) { | 268 | data = kzalloc(sizeof(struct smsc47b397_data), GFP_KERNEL); |
269 | if (!data) { | ||
269 | err = -ENOMEM; | 270 | err = -ENOMEM; |
270 | goto error_release; | 271 | goto error_release; |
271 | } | 272 | } |
@@ -276,7 +277,8 @@ static int __devinit smsc47b397_probe(struct platform_device *pdev) | |||
276 | mutex_init(&data->update_lock); | 277 | mutex_init(&data->update_lock); |
277 | platform_set_drvdata(pdev, data); | 278 | platform_set_drvdata(pdev, data); |
278 | 279 | ||
279 | if ((err = sysfs_create_group(&dev->kobj, &smsc47b397_group))) | 280 | err = sysfs_create_group(&dev->kobj, &smsc47b397_group); |
281 | if (err) | ||
280 | goto error_free; | 282 | goto error_free; |
281 | 283 | ||
282 | data->hwmon_dev = hwmon_device_register(dev); | 284 | data->hwmon_dev = hwmon_device_register(dev); |
@@ -345,7 +347,7 @@ static int __init smsc47b397_find(unsigned short *addr) | |||
345 | superio_enter(); | 347 | superio_enter(); |
346 | id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID); | 348 | id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID); |
347 | 349 | ||
348 | switch(id) { | 350 | switch (id) { |
349 | case 0x81: | 351 | case 0x81: |
350 | name = "SCH5307-NS"; | 352 | name = "SCH5307-NS"; |
351 | break; | 353 | break; |
@@ -379,7 +381,8 @@ static int __init smsc47b397_init(void) | |||
379 | unsigned short address; | 381 | unsigned short address; |
380 | int ret; | 382 | int ret; |
381 | 383 | ||
382 | if ((ret = smsc47b397_find(&address))) | 384 | ret = smsc47b397_find(&address); |
385 | if (ret) | ||
383 | return ret; | 386 | return ret; |
384 | 387 | ||
385 | ret = platform_driver_register(&smsc47b397_driver); | 388 | ret = platform_driver_register(&smsc47b397_driver); |