mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
RDMA/mthca: Remove unnecessary NULL assignments
There are many pointers assigned first, which need not to be initialized, so remove the NULL assignments. Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230731065543.2285928-1-ruanjinjie@huawei.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
d43ea9c3d5
commit
50f338cd88
|
|
@ -53,8 +53,8 @@
|
|||
static int mthca_query_device(struct ib_device *ibdev, struct ib_device_attr *props,
|
||||
struct ib_udata *uhw)
|
||||
{
|
||||
struct ib_smp *in_mad = NULL;
|
||||
struct ib_smp *out_mad = NULL;
|
||||
struct ib_smp *in_mad;
|
||||
struct ib_smp *out_mad;
|
||||
int err = -ENOMEM;
|
||||
struct mthca_dev *mdev = to_mdev(ibdev);
|
||||
|
||||
|
|
@ -121,8 +121,8 @@ static int mthca_query_device(struct ib_device *ibdev, struct ib_device_attr *pr
|
|||
static int mthca_query_port(struct ib_device *ibdev,
|
||||
u32 port, struct ib_port_attr *props)
|
||||
{
|
||||
struct ib_smp *in_mad = NULL;
|
||||
struct ib_smp *out_mad = NULL;
|
||||
struct ib_smp *in_mad;
|
||||
struct ib_smp *out_mad;
|
||||
int err = -ENOMEM;
|
||||
|
||||
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
|
||||
|
|
@ -217,8 +217,8 @@ static int mthca_modify_port(struct ib_device *ibdev,
|
|||
static int mthca_query_pkey(struct ib_device *ibdev,
|
||||
u32 port, u16 index, u16 *pkey)
|
||||
{
|
||||
struct ib_smp *in_mad = NULL;
|
||||
struct ib_smp *out_mad = NULL;
|
||||
struct ib_smp *in_mad;
|
||||
struct ib_smp *out_mad;
|
||||
int err = -ENOMEM;
|
||||
|
||||
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
|
||||
|
|
@ -246,8 +246,8 @@ static int mthca_query_pkey(struct ib_device *ibdev,
|
|||
static int mthca_query_gid(struct ib_device *ibdev, u32 port,
|
||||
int index, union ib_gid *gid)
|
||||
{
|
||||
struct ib_smp *in_mad = NULL;
|
||||
struct ib_smp *out_mad = NULL;
|
||||
struct ib_smp *in_mad;
|
||||
struct ib_smp *out_mad;
|
||||
int err = -ENOMEM;
|
||||
|
||||
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
|
||||
|
|
@ -989,8 +989,8 @@ static const struct attribute_group mthca_attr_group = {
|
|||
|
||||
static int mthca_init_node_data(struct mthca_dev *dev)
|
||||
{
|
||||
struct ib_smp *in_mad = NULL;
|
||||
struct ib_smp *out_mad = NULL;
|
||||
struct ib_smp *in_mad;
|
||||
struct ib_smp *out_mad;
|
||||
int err = -ENOMEM;
|
||||
|
||||
in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user