Exploit databaseDownload repository ZIP
GH-9a497cc26994d431b276e9e3b7a8f75c
satheesh575555/linux-4.19.72_cve-2023-0386
Sources for CVE-2023-0386
20 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files221
satheesh575555/linux-4.19.72_cve-2023-0386Revision ef9a4a9fbf2b
- ↑..Parent directory
- 88pm800.c
- 88pm805.c
- 88pm80x.c
- 88pm860x-core.c
- 88pm860x-i2c.c
- Kconfig
- Makefile
- aat2870-core.c
- ab3100-core.c
- ab3100-otp.c
- ab8500-core.c
- ab8500-debugfs.c
- ab8500-gpadc.c
- ab8500-sysctrl.c
- abx500-core.c
- ac100.c
- act8945a.c
- adp5520.c
- altera-a10sr.c
- arizona-core.c
- arizona-i2c.c
- arizona-irq.c
- arizona-spi.c
- arizona.h
- as3711.c
- as3722.c
- asic3.c
- atmel-flexcom.c
- atmel-hlcdc.c
- atmel-smc.c
- axp20x-i2c.c
- axp20x-rsb.c
- axp20x.c
- bcm590xx.c
- bd9571mwv.c
- cros_ec.c
- cros_ec_dev.c
- cros_ec_dev.h
- cs47l24-tables.c
- cs47l35-tables.c
- cs47l85-tables.c
- cs47l90-tables.c
- cs5535-mfd.c
- da903x.c
- da9052-core.c
- da9052-i2c.c
- da9052-irq.c
- da9052-spi.c
- da9055-core.c
- da9055-i2c.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/mfd/lp87565.c
C · 2,546 bytes/*
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
*
* Author: Keerthy <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*/
#include <linux/interrupt.h>
#include <linux/mfd/core.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
#include <linux/mfd/lp87565.h>
static const struct regmap_config lp87565_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = LP87565_REG_MAX,
};
static const struct mfd_cell lp87565_cells[] = {
{ .name = "lp87565-q1-regulator", },
{ .name = "lp87565-q1-gpio", },
};
static const struct of_device_id of_lp87565_match_table[] = {
{ .compatible = "ti,lp87565", },
{
.compatible = "ti,lp87565-q1",
.data = (void *)LP87565_DEVICE_TYPE_LP87565_Q1,
},
{}
};
MODULE_DEVICE_TABLE(of, of_lp87565_match_table);
static int lp87565_probe(struct i2c_client *client,
const struct i2c_device_id *ids)
{
struct lp87565 *lp87565;
const struct of_device_id *of_id;
int ret;
unsigned int otpid;
lp87565 = devm_kzalloc(&client->dev, sizeof(*lp87565), GFP_KERNEL);
if (!lp87565)
return -ENOMEM;
lp87565->dev = &client->dev;
lp87565->regmap = devm_regmap_init_i2c(client, &lp87565_regmap_config);
if (IS_ERR(lp87565->regmap)) {
ret = PTR_ERR(lp87565->regmap);
dev_err(lp87565->dev,
"Failed to initialize register map: %d\n", ret);
return ret;
}
ret = regmap_read(lp87565->regmap, LP87565_REG_OTP_REV, &otpid);
if (ret) {
dev_err(lp87565->dev, "Failed to read OTP ID\n");
return ret;
}
lp87565->rev = otpid & LP87565_OTP_REV_OTP_ID;
of_id = of_match_device(of_lp87565_match_table, &client->dev);
if (of_id)
lp87565->dev_type = (enum lp87565_device_type)of_id->data;
i2c_set_clientdata(client, lp87565);
return devm_mfd_add_devices(lp87565->dev, PLATFORM_DEVID_AUTO,
lp87565_cells, ARRAY_SIZE(lp87565_cells),
NULL, 0, NULL);
}
static const struct i2c_device_id lp87565_id_table[] = {
{ "lp87565-q1", 0 },
{ },
};
MODULE_DEVICE_TABLE(i2c, lp87565_id_table);
static struct i2c_driver lp87565_driver = {
.driver = {
.name = "lp87565",
.of_match_table = of_lp87565_match_table,
},
.probe = lp87565_probe,
.id_table = lp87565_id_table,
};
module_i2c_driver(lp87565_driver);
MODULE_AUTHOR("J Keerthy <[email protected]>");
MODULE_DESCRIPTION("lp87565 chip family Multi-Function Device driver");
MODULE_LICENSE("GPL v2");