The following issues were found

drivers/mfd/timberdale.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 631 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              {
	struct timberdale_device *priv = dev_get_drvdata(dev);

	return sprintf(buf, "%d.%d.%d\n", priv->fw.major, priv->fw.minor,
		priv->fw.config);
}

static DEVICE_ATTR_RO(fw_ver);


            

Reported by FlawFinder.

drivers/mfd/tps6507x.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 77 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		return -EINVAL;

	msg[0] = reg;
	memcpy(&msg[1], src, bytes);

	ret = i2c_master_send(i2c, msg, bytes + 1);
	if (ret < 0)
		return ret;
	if (ret != bytes + 1)

            

Reported by FlawFinder.

drivers/mfd/tps65911-comparator.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 107 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              
	uVolt = comp_threshold_get(tps65910, id);

	return sprintf(buf, "%d\n", uVolt);
}

static DEVICE_ATTR(comp1_threshold, S_IRUGO, comp_threshold_show, NULL);
static DEVICE_ATTR(comp2_threshold, S_IRUGO, comp_threshold_show, NULL);


            

Reported by FlawFinder.

drivers/mfd/twl-core.c
1 issues
Dangerous assignment - the function parameter is assigned the address of a local auto-variable. Local auto-variables are reserved from the stack which is freed when the function ends. So the pointer to a local variable is invalid after the function ends.
Error

Line: 686 CWE codes: 562

              		drv_data.set_voltage = NULL;
		drv_data.get_voltage = NULL;
		drv_data.data = NULL;
		pdata->driver_data = &drv_data;
	}

	/* NOTE:  we currently ignore regulator IRQs, e.g. for short circuits */
	return add_numbered_child(TWL_MODULE_PM_MASTER, "twl_reg", num,
		pdata, sizeof(*pdata), false, 0, 0);

            

Reported by Cppcheck.

drivers/mfd/twl4030-irq.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 56 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              static int irq_line;

struct sih {
	char	name[8];
	u8	module;			/* module id */
	u8	control_offset;		/* for SIH_CTRL */
	bool	set_cor;

	u8	bits;			/* valid in isr/imr */

            

Reported by FlawFinder.

drivers/mfd/ucb1x00-assabet.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 29 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              	ucb1x00_adc_enable(ucb);				\
	val = ucb1x00_adc_read(ucb, input, UCB_NOSYNC);		\
	ucb1x00_adc_disable(ucb);				\
	return sprintf(buf, "%d\n", val);			\
}								\
static DEVICE_ATTR_RO(name)

UCB1X00_ATTR(vbatt, UCB_ADC_INP_AD1);
UCB1X00_ATTR(vcharger, UCB_ADC_INP_AD0);

            

Reported by FlawFinder.

drivers/mfd/wm831x-i2c.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 61 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	}

	if (pdata)
		memcpy(&wm831x->pdata, pdata, sizeof(*pdata));

	return wm831x_device_init(wm831x, i2c->irq);
}

static int wm831x_i2c_suspend(struct device *dev)

            

Reported by FlawFinder.

drivers/media/common/siano/sms-cards.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 74 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              
struct sms_board {
	enum sms_device_type_st type;
	char *name, *fw[DEVICE_MODE_MAX];
	struct sms_board_gpio_cfg board_cfg;
	char *rc_codes;				/* Name of IR codes table */

	/* gpios */
	int led_power, led_hi, led_lo, lna_ctrl, rf_switch;

            

Reported by FlawFinder.

drivers/mfd/wm831x-spi.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 60 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	}

	if (pdata)
		memcpy(&wm831x->pdata, pdata, sizeof(*pdata));

	return wm831x_device_init(wm831x, spi->irq);
}

static int wm831x_spi_suspend(struct device *dev)

            

Reported by FlawFinder.

drivers/net/ethernet/chelsio/cxgb3/t3cdev.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 53 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              };

struct t3cdev {
	char name[T3CNAMSIZ];	/* T3C device name */
	enum t3ctype type;
	struct list_head ofld_dev_list;	/* for list linking */
	struct net_device *lldev;	/* LL dev associated with T3C messages */
	struct proc_dir_entry *proc_dir;	/* root of proc dir for this T3C */
	int (*send)(struct t3cdev *dev, struct sk_buff *skb);

            

Reported by FlawFinder.