nvdisp_serdes: Fix CERT ARR30-C

- This patch fixes the following CERT violation
   CERT ARR30-C - 3
     (CID - 6388489)

   - Passed the priv->client directly

 - JIRA TDS-15862

   CERT ARR30-C:
     __mptr - 32UL evaluates to an address that
     is at byte offset -32 of an array of 848
     bytes

Change-Id: If513c6d718019d50d9a19bdd864650be9ed45bfd
Signed-off-by: Saravanan Ponnuswamy <saravananp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3344668
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
This commit is contained in:
Saravanan Ponnuswamy
2025-04-21 04:43:12 +00:00
committed by Jon Hunter
parent 7fec719a7c
commit 45b9d2ed87

View File

@@ -538,7 +538,6 @@ static irqreturn_t nvdisp_serdes_irq_handler(int irq, void *dev_id)
struct nvdisp_serdes_priv *priv = dev_id;
struct device *dev = &priv->client->dev;
int32_t errb_pos = 0;
struct i2c_client *client = to_i2c_client(dev);
int ret;
dev_dbg(dev, "%s: errb interrupt triggered\n", __func__);
@@ -550,7 +549,8 @@ static irqreturn_t nvdisp_serdes_irq_handler(int irq, void *dev_id)
/* opcode dispatcher code */
while (errb_pos < priv->errb_seq.length) {
ret = dispatch_opcode(client, priv, priv->errb_seq.payload, &errb_pos, priv->errb_seq.length);
ret = dispatch_opcode(priv->client, priv, priv->errb_seq.payload,
&errb_pos, priv->errb_seq.length);
if (ret < 0) {
dev_err(dev, "%s: dispatch_opcode failed (%d) at errb_pos = %d\n",
__func__, ret, errb_pos);